POV-Ray : Newsgroups : povray.advanced-users : Enabling relative coordinate placement : Re: Enabling relative coordinate placement Server Time
1 Jul 2024 04:59:52 EDT (-0400)
  Re: Enabling relative coordinate placement  
From: clipka
Date: 20 Sep 2009 12:56:14
Message: <4ab65eae$1@news.povray.org>
Kene schrieb:
> 1. Ability to create new object by referencing the location of another. The
> placement of the new object is a distance or angle relative to the existing
> object. For example to create a new wall by referencing the position of
> BedRm_North_Wall
>    - #declare BedRm_South_Wall = Make_Wall_Offset( BedRm_North_Wall, New_Length,
> New_Height, New_Thickness, Offset_Distance )

Definitely not possible in POV-Ray, unless you write your own framework 
(i.e. basically place another language on top of SDL) to do this sort of 
things.

> 2. Functions in a macro or that can get information from a macro
>    I would like to be able to perform actions on a declared object. For example
> instead of rotating and/or translating when they are created, these actions can
> be performed afterward for example
>    - #declare BedRm_North_Wall = Make_Wall( Length, Height, Thickness )
>    - BedRm_North_Wall_Rotate( angle )
>    - BedRm_North_Wall_Offset( offset_distance )

you can define macros as:

   #macro Rotate_Object(Obj,Angle)
     object { Obj rotate Angle }
   #end

which you could then use like this:

   #declare BedRm_North_Wall = Make_Wall( Length, Height, Thickness )
   Rotate_Object ( BedRm_North_Wall, angle )
   ...


Post a reply to this message

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