|
![](/i/fill.gif) |
Mike Kost <con### [at] povray tashcorp net> wrote:
> 1. What Camera?
> It helps to remove the camera declaration out of the scene. The default
> camera is located at <0,0,0> and looking at <0,0,1>. If you must move the
> camera, the camera will continue to look in the +z direction from it's new
> location, the equivalent of 'camera{location loc look_at loc+z}'. This
> prevents having to use 'look_at <a,b,c>'
Usually putting a camera statement at all is a waste of space. Translating
the scene usually takes less space. And yes, you can often use tricks to
avoid the 'translate' keyword too.
> What's even better is that you can throw out the rgb reference if you use
> vectors, i.e.:
> 'pigment{color x}' = 'pigment{color rgb <1,0,0>}'
Why not 'pigment{rgb x}'?
This is not just a "short code trick", it should be basic knowledge right
from the documentation.
> 3. Vector Substitution
> A constant 'C' will be interpreted as '<C,C,C>' if the parser needs a
> vector. This can be quite useful since '1-z' is equivalent to '<1,1,0>',
> but with less than half the bytes.
Again not even a "trick", but basic info straight from the documentation.
> #macro a(b)#if(b<5)box{-1,1scale.5translate y-3pigment{color x}}#end#end
That's not even the shortest way of doing that ;)
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |