POV-Ray : Newsgroups : povray.binaries.images : Isosurface gears : Re: Isosurface gears Server Time
14 Nov 2024 00:18:40 EST (-0500)
  Re: Isosurface gears  
From: Budgery
Date: 15 Apr 2004 15:40:01
Message: <web.407ee47784498a2ea1fd027f0@news.povray.org>
"laurent.artaud[AT]free.fr" <"laurent.artaud[AT]free.fr"> wrote:
> Impressive!
>
> Can you post the source?
>

Thanks!

I would post the source, but I'm still trying to track down a little
bug....Those images were made with a previous version where each gear
needed 3 isosurfaces unioned together (which was a fantastic improvement
over the first working code I had where it called one isosurface per gear
tooth).  With the old version, everything worked great, but I wanted to get
it down to one continuous isosurface for the entire gear.  It works great
for any gear with an even number of teeth, but for odds, there is a tiny
gap that needs to be fixed.  I would have easily gotten that done today,
but the beta version expired and they haven't released the new one yet.

I guess I could still post the source, but trust me, you don't want to see
it until I get some documentation in there....its really ugly looking

( mod(atan2(y,x)+( (twist>0)*(z*twist) + (twist<0)*(abs(twist)*(1-z)) +
pi*(1+mod(freq,2)*pi/freq)*(y<0) ),2*pi/freq) > flat           ) *
( mod(atan2(y,x)+( (twist>0)*(z*twist) + (twist<0)*(abs(twist)*(1-z)) +
pi*(1+mod(freq,2)*pi/freq)*(y<0) ),2*pi/freq) < pi/freq        ) *
( (mod(atan2(y,x)+( (twist>0)*(z*twist) + (twist<0)*(abs(twist)*(1-z)) +
pi*(1+mod(freq,2)*pi/freq)*(y<0) ),2*pi/freq)-flat)/((pi/freq)-flat)*depth
) +

See what I'm saying? :)  And that's just one quarter of the isosurface
function.  Actually, it looks alot better in the povray edit window, but it
still could use explanations of what each little part does, not to mention
variable names.


Post a reply to this message

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