POV-Ray : Newsgroups : povray.advanced-users : Macro in POV-ray : Re: Macro in POV-ray Server Time
16 May 2024 07:40:12 EDT (-0400)
  Re: Macro in POV-ray  
From: Alain
Date: 19 Oct 2014 18:51:25
Message: <5444406d@news.povray.org>


> Can we make a macro for a box? In which box is formed using 8 vertex?
>
>
> Thanks
> Gurwinder Singh Bains
>
>

While it can be made, it's much simpler, faster and less prone to errors 
to use the box primitive. The face of that box are parallel to the 
reference planes. If you want your box in another orientation, you just 
need to create is around the origin, rotate it as needed, and translate 
it to the desired location, or use the Rotate_Around_Trans macro.
It can also be done using the prism primitive using a 4 sided base. Good 
if the "box" you want faces are not parallel to each others.
You can also use a transform matrix if you want to shear your box.

Finaly, if you want to have non-flat faces, you can use an union of 8 
bicubic patches or a mesh.
A macro can automate the creation process for those.


Alain


Post a reply to this message

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