POV-Ray : Newsgroups : povray.general : Modify already created object : Re: Modify already created object Server Time
6 Oct 2024 10:01:08 EDT (-0400)
  Re: Modify already created object  
From: Alain
Date: 29 Aug 2014 22:00:32
Message: <54013040@news.povray.org>

> clipka <ano### [at] anonymousorg> wrote:
>> Am 29.08.2014 16:21, schrieb bublible:
>>
>>> BTW some other question: how can I access some array values? I mean vector
>>> values like ldd_camera_position variable consists of 3 values of x, y and z. Now
>>> how can I access them individually? I come from FLASH ActioScript2 scene and
>>> there you would do it easily like "ldd_camera_position[x]" where "x" is the
>>> index number beginning with 0...so how it is made in PovRay, please?
>>
>> You can access the components of some vector MyVector as follows:
>>
>>     MyVector.x
>>     MyVector.y
>>     MyVector.z
>
> Thanx a lot.
>
> Another problem: I am not able find pattern that would do "radial gradient",
> that is circle blending (normal gradient transform linear on x or y axis). I was
> trying: onion, planar, wood...with all there is one big problem: I need to apply
> it to polygon (simple square) STARTING FROM THE CENTER, but all those patterns
> starting from a corner??? Being webdesigner I never saw anything like that cos
> when I apply circle/radial gradient those are centric circles, not ones having
> their center in a corner. I was trying to transalte its center but it did not do
> what I was expecting...please, help again my friend if you can. :(
>
>
>
>

The onion pattern give you a repeating spherical gradient that is 
centered at the origin, or <0,0,0> going from zero at the origin, 
climbing to 1 at a radius of 1 then drop to zero.

The wood pattern give you a cylindrical repeating pattern along the Z axis.

The followings DON'T repeat :

The planar pattern evaluate to 1 on the X-Z plane and drop to zero at 
+1*y and -1*y.

The spherical pattern evaluate to 1 at <0,0,0> and drop to zero ar a 
radius of 1 in every directions.

The cylincrical pattern evaluate to 1 at the Y axis and drop to zero at 
a radius of 1 parallel to the x-z plane.

In POV-Ray, most pattern fill the space and the objects are "carved" 
from them. There are a few exeptions: aoi and slope.

Objects take the pattern from the location where they are created. After 
the pattern is applyed to an object, then, the pattern will follow that 
object's rotations, scallings and translations. If the pattern is 
applyed after any transform, the pattern will look as if it's moving on 
the object, but it realy is the other way around: The object is moving 
through the pattern.



Alain


Post a reply to this message

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