POV-Ray : Newsgroups : povray.general : Need a Macro; derive Visible Space Params : Need a Macro; derive Visible Space Params Server Time
2 Aug 2024 10:28:01 EDT (-0400)
  Need a Macro; derive Visible Space Params  
From: Jeff
Date: 2 Nov 2004 22:20:00
Message: <web.41884da2d3548ff934d765680@news.povray.org>
I remember running a across a macro a couple of years ago that was supposed
to generate a lot of 3D stars (spheres) and so as not to waste effort, this
macro was supposed to *only* calculate and place stars in the *visable
area* of the screen (rather than just generate 5000 stars all over the
place, most of which you won't see).

As I recall, the macro didn't work to begin with and in any case I can't
find it in the PovRay links or on the web.

I need a macro that (preferably) : Given the camera location vector, look_at
vector and the camera angle (Field of View), derive the angles (random
negative and positive Pitches and Azimuths) to be used in a rotate
<Pitch,Azimuth,Bank> transformation and will *only* put an object on to the
*visible* part of the screen. The object will have already been defined at
the origin < 0, 0, 0>, scaled and then transformed out via a translate < 0,
0, SomeHugeAmountofZee>.

*OR*

Maybe just something that will put a bunch of triangles, discs or spheres at
random X and Y (but at a fixed Zee). It would be better with a rotate as
begged for in the last paragraph though... with a rotate triangles or discs
would be facing the correct direction (towards the camera ... or at least
towards the origin, which might be close enough).

I found a macro that MIGHT help me if I can perform some surgery on it
without frying too many of my brain cells : a modified Look_At_Raised macro
(part of his Look_At macro) by Tim Nikias Wenclawiak at
www.digitaltwilight.de/no_lights. Trying this is giving me headaches,
though. Strokes, even.

Any help would be greatly appreciated. Thanks - Jeff


Post a reply to this message

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