POV-Ray : Newsgroups : povray.off-topic : Completely pointless : Re: Completely pointless Server Time
10 Oct 2024 19:23:21 EDT (-0400)
  Re: Completely pointless  
From: Orchid XP v7
Date: 29 Feb 2008 16:00:04
Message: <47c87254@news.povray.org>
Nekar wrote:
> It reminds me of when I first heard of the Mandelbrot set in the late 80's.
> My first try on my 48k ZX spectrum resulted in a rather skew Mandelbrot set.
> Then I realised I had been adding a -1 in the recursion, that shouldn't be
> there... :-P

Yeah, implementing an algorithm for the very first time is always way 
hard. Especially if you don't have a working reference implementation to 
go from! :-S [And let's face it, those are usually in C.]

Spare a thought for me when I wrote my first ray tracer! All I had was 
the POV-Ray user manual. From that, I eventually figured out that you 
can find the intersections between a ray and a sphere by solving a set 
of simultaneous equations. And then, I managed to work out that since 
the ray equation is parametric, if you *substitute* it into the sphere 
equation, you get an equation in only 1 unknown. And then I had to shift 
algebra around to discover the final form of this equation. And then I 
spent 4 BONEHEAD hours trying to work out how to solve this equation. 
(After which, obviously, I remembered that "oh yeah, there's a formula 
for that". DUH!)

And then I went upstairs and implemented it in Borland TurboPascal 5.5 
for DOS, in 16-colour VGA glory. And it freakin' worked! First damn 
time. I was amazed...

Yeah, it's much better if you have a reference implementation!

[Of course, today you do. Warp has kindly added one to the POV-Ray 
manual. But I should emphasise that wasn't there back when I worked all 
this out the hard way. Damn, if only you could get meddles or something...]

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.