POV-Ray : Newsgroups : povray.advanced-users : Enabling relative coordinate placement : Re: Enabling relative coordinate placement Server Time
1 Jul 2024 05:21:44 EDT (-0400)
  Re: Enabling relative coordinate placement  
From: Kene
Date: 20 Sep 2009 13:30:00
Message: <web.4ab6655fba1022f6772dd76f0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> 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 )
>    ...

Supposing the object has been translated to <1500,8000,0> my guess is that the
rotation you describe above will no longer work as expected. The wall has to be
rotated when created at <0,0,0> before being moved. Right?


Post a reply to this message

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