POV-Ray : Newsgroups : povray.newusers : object parameters : Re: object parameters Server Time
29 Apr 2024 00:19:00 EDT (-0400)
  Re: object parameters  
From: seNex
Date: 15 Feb 2023 05:40:00
Message: <web.63ecb61edae7e3799b54cfa5c411274@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:

> > is there a way to get the parameter of an object after its declaration? For
> > example if I create a sphere named mysphere with center <x,y,z> and radius 1,
> > can I use a
> > function to write these to new variables? Like:
> >
> >
> > #declare mysphere=sphere{<x,y,z>,1};
> >
> > #declare sphere_center=centerfunction(mysphere);
> > #declare sphere_radius=radiusfunktion(mysphere);
> >
> >
>
> There are no such function. Those values are never visible from the SDL
> perspective. The recommended thing to do is to declare the centre and
> radius then to use those declared value when you #declare your object :
>
> #declare Sphere_centre= Some_location;
> #declare Sphere_radius= Some_Radius;
> #declare Mysphere=sphere{Sphere_centre, Sphere_radius}

thanks for the quick reply. The underlying problem is, I wanted to track the
center of the sphere after applying transformations to it. It seems to me from
the documentation, that there is no way to apply transformations to the vector,
but only to objects.


Post a reply to this message

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