BBC BASIC raytracer in 432 characters
mastodon.me.uk
BBC BASIC raytracer in 432 characters
1–10 of 96 posts
Re: BBC BASIC raytracer in 432 characters
#2[dead]
Re: BBC BASIC raytracer in 432 characters
#3In the replies underneath, someone ran it on a real Acorn Electron computer (6502 at 1 MHz), where it completed in 8 hours and 40 minutes. Not too bad really.
Re: BBC BASIC raytracer in 432 characters
#4In the replies underneath, someone ran it on a real Acorn Electron computer (6502 at 1 MHz), where it completed in 8 hours and 40 minutes. Not too bad really.
that's astounding; i would have guessed months or years
Re: BBC BASIC raytracer in 432 characters
#5this says `goto 50` but there are no line numbers
Re: BBC BASIC raytracer in 432 characters
#6In the replies underneath, someone ran it on a real Acorn Electron computer (6502 at 1 MHz), where it completed in 8 hours and 40 minutes. Not too bad really.
that's astounding; i would have guessed months or years
BBC BASIC is surprisingly efficient for an interpreted language. It kind of had to be, running on processors that slow.
Re: BBC BASIC raytracer in 432 characters
#7[deleted]
Re: BBC BASIC raytracer in 432 characters
#8this says `goto 50` but there are no line numbers
The robot automatically adds line numbers in increments of 10s.
Re: BBC BASIC raytracer in 432 characters
#9Ok, this is probably a dumb question: I get that the code traces the rays for this scene, obviously — but where is the scene, then? That is, where is the “data” (as opposed to the algorithm) that says “there’s a sphere at coordinates x,y,z with radius r, and here’s the other one, and here’s the checkerboard plane”?
Re: BBC BASIC raytracer in 432 characters
#10Earlier quoted context omitted.
that's astounding; i would have guessed months or years
BBC BASIC is surprisingly efficient for an interpreted language. It kind of had to be, running on processors that slow.
Some good discussion of that on The BBC BASIC wiki entry: https://en.wikipedia.org/wiki/BBC_BASIC (paragraph beginning "Due to a number of optimizations[…]".