News for hackers. Stuff that matters.
Re:Show HN: Old School Graphics Algorithms by ggambetta on Sunday July 07, 2019 @05:15AM (#20374252)
Lovely :) The examples remind me of the short programs for the ZX Spectrum published in magazines like Microhobby, which would create visually interesting images using PLOT, DRAW, and a couple of loops. Come to think about it, that might have been my first contact with Computer Graphics :)
Re:Show HN: Old School Graphics Algorithms by stevekemp on Sunday July 07, 2019 @12:33PM (#20375918)
My first introduction to graphics was definitely the type-in-program listed in the back of the (orange) manual I received with my 48k ZX Spectrum. It drew a UK-flag.

Here's the source, which gives me a moment of nostalgia:

http://boriel.com/wiki/en/index.php/ZX_BASIC:Flag.bas

I wrote a simple BASIC interpreter recently, in golang, and hacked in support for outputing PNG images of code. I should see if I can get that sample to run (mostly) unchanged!

Re:Show HN: Old School Graphics Algorithms by ggambetta on Sunday July 07, 2019 @12:57PM (#20376100)
Nice! Some time ago I worked on a ZX BASIC interpreter in Javascript, so it could run on browsers. My idea was that kids these days™ don't have an environment as easily available and immediately gratifying as we did back then, so I wanted to make one!

Have you considered doing something similar with yours?

Re:Show HN: Old School Graphics Algorithms by stevekemp on Monday July 08, 2019 @03:27AM (#20380628)
I did embed it in a web-server, so that the user can enter BASIC into a <textarea> and have the output rendered by their browser as an image. I called it "visual basic" ;)

https://github.com/skx/gobasic/#80-print-visual-basic

Just a small example really of embedding, I suspect to make it really useful for new-programmers it'd need a lot of overhaul.

When my child gets old enough I'll probably just give them a BBC-emulator, or similar to get started with.

Re:Show HN: Old School Graphics Algorithms by sliken on Monday July 08, 2019 @07:06PM (#20387604)
The reminds me of the the days before affordable color bitmap displays. I wrote a unix program to render the mandlebrot set in greyscale. Then a VMS program to render the greyscale image into postscript.

I was in a university lab with a 8 foot long laser printer that normally spit out 200 pages per minutes or so with the first page being a giant ascii rendering of your username. It made a cool frewp noise with each page shot out into a self collating set of shelves. The vast majority of the output was just ascii.

My mandelbrot set kept the printer busy for a few minutes, the operator wanted to reboot. I pleaded with them to leave it run. It finally spit out a page at at least 300 dpi, everyone in the lab came to look and was amazed. Back in those days rending a 3150x2250 part of the mandelbrot set was a substantial amount of compute. These days something like that runs at 60 fps.

Re:Show HN: Old School Graphics Algorithms by atum47 on Sunday July 07, 2019 @06:25AM (#20374436)
really cool, I usually draw my stuff on a JavaScript canvas, but I'll try to port one of my codes to c++ using this. thanks for sharing
Re:Show HN: Old School Graphics Algorithms by quintonish on Wednesday July 10, 2019 @05:38PM (#20406852)
It's fun to play around with the algorithms in JavaScript. https://codepen.io/collection/AkoojL
Re:Show HN: Old School Graphics Algorithms by person_of_color on Sunday July 07, 2019 @11:52PM (#20379768)
I did an OpenGL tutorial when it was basically a fancy state machine. Boy how things have changed. Never found a good resource for modern graphics.
Re:Show HN: Old School Graphics Algorithms by jmt_ on Sunday July 07, 2019 @10:53AM (#20375374)
Going to have a good time implementing a few of these myself. Any other references/resources for neat graphics algorithms on the more compact side?
Re:Show HN: Old School Graphics Algorithms by salgernon on Sunday July 07, 2019 @11:20AM (#20375512)
Look for the original Graphics Gems I and II books (circa 1991)

https://www.glassner.com/portfolio/graphics-gems/

Re:Show HN: Old School Graphics Algorithms by jmt_ on Sunday July 07, 2019 @11:44AM (#20375645)
Exactly what I was looking for you, thank you:)
Re:Show HN: Old School Graphics Algorithms by myth_drannon on Sunday July 07, 2019 @02:57PM (#20377011)
Re:Show HN: Old School Graphics Algorithms by dang on Sunday July 07, 2019 @10:50AM (#20375355)
(This looks great but please don't put Show HN on reading material or tutorials. See https://news.ycombinator.com/showhn.html for the rules.)
Re:Show HN: Old School Graphics Algorithms by klingonopera on Sunday July 07, 2019 @12:48PM (#20376034)
...but it's his library? The tutorials on the page are just examples for the library, which is linked at the top of the page?

Or rather: How would he present a "Show HN" topic about this specific library? This is the library's actual page, as I understand?

Re:Show HN: Old School Graphics Algorithms by dang on Sunday July 07, 2019 @04:26PM (#20377611)
I missed that. Sorry! Title restored.
Re:Show HN: Old School Graphics Algorithms by craftinator on Sunday July 07, 2019 @01:24PM (#20376279)
Please don't be a rules monger. Thanks!
Re:Show HN: Old School Graphics Algorithms by dang on Sunday July 07, 2019 @04:28PM (#20377621)
I'm a moderator here so it's my job. Yes, the moderation comments are off topic and tedious. Alas, the system can't autocorrect without them.

If it helps at all, they're a thousand times more tedious to write than they are to read.

Re:Show HN: Old School Graphics Algorithms by craftinator on Friday July 12, 2019 @02:21AM (#20418684)
I don't think that you being a moderator changes my statement. And no, I don't find relief in the frustrations of others.