POV-Ray : Newsgroups : povray.off-topic : ASAP : ASAP Server Time
11 Oct 2024 07:13:03 EDT (-0400)
  ASAP  
From: scott
Date: 7 Nov 2007 17:48:45
Message: <473240cd@news.povray.org>
Been playing around with a *real* (ducks to avoid the flames) ray tracer 
recently.  ASAP is used to model and simulate physically correct optics. 
The dudes who design LEDs use this, as do the people designing lights for 
cars, camera lens systems etc, it seems like it's pretty much the industry 
standard based on the list of customers they say they have.

It's actually quite similar to POV in the way it works.  You set up your 
scene with a script (more about that in a bit).  Light sources can be any 
object or surface, you set the distribution of rays and angles, wavelengths 
and powers.  You give all the surfaces "interface" properties, and bits 
inside get media.  Sounding familiar?  But then instead of any cameras you 
just analyse the rays hitting a certain surface (or group of surfaces) using 
a number of the hundreds of tools built in.

The default "max_trace_level" is 4096 :-)  Apparently when designing optical 
systems that rely heavily on total internal reflection (eg optical fibres 
etc) this needs to be increased...

It won't give you any pretty pictures like POV does, but it will give you 
nice plots of brightness over a surface after light has come from a helical 
filament and gone through 8 lenses :-)

Anyway, the scripting language is what lets it down.  It really is the most 
annoying language I have ever had to use.  There are just so many illogical 
constraints that seem totally pointless.  For example, you can use the @ 
sign to repeat entries, so 4@0 gives you four 0's in a row, or 6@-3 gives 
you six -3's.  The clever bit is you can do -4@1, which will give you four 
1's but alternating the sign, so you get 1,-1,1,-1.  Now, you'd think 
that -4@-1 would give you -1,1,-1,1 ... but no, apparently that's just not 
possible.

Add to that you can't have an if/endif without an else, lots of things have 
to be in certain positions, there's lot of rules about where you *must* have 
whitespace, and of course where you *mustn't* have whitespace (eg 2+3 * 4 is 
illegal), it just drives me mad since I am used to C++ and SDL.

Oh and the referencing system.  Suppose you have defined two objects and you 
want to do something with them... Well, you have two choices, reference them 
absolutely by number, or relatively.  ie you can only say "merge the 2nd and 
5th item created" or "merge the item above and the one two items above 
that".

I'm beginning to love SDL even more...


Post a reply to this message

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