POV-Ray : Newsgroups : povray.advanced-users : Enabling relative coordinate placement : Re: Enabling relative coordinate placement Server Time
1 Jul 2024 04:42:50 EDT (-0400)
  Re: Enabling relative coordinate placement  
From: Kene
Date: 20 Sep 2009 13:40:01
Message: <web.4ab66809ba1022f6772dd76f0@news.povray.org>
"Kene" <nomail@nomail> wrote:
> 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?

OK I think I see you have done what I am saying. Thanks.
It looks like for the first question I have to implement a go-between script.


Post a reply to this message

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