|
![](/i/fill.gif) |
On 1-12-2012 16:14, Albun wrote:
> ;-) The Sun don't shining enought to turn flower.
>
> 1)I don't understand how calculate distance, without move directly to the
> array_point that i have.
> There is VDist(V1,V2), but what else with angle VAngleD(V1,V2)?
>
> 2)In my exemple the Sun, not origin, is at <3,0,54>.
> With "transform.inc", i adjust code like that after translate with the forth.
> but no result.
>
You have always to work from the origin and translate to the correct
position later. Here is an example:
//Use of Point_At_Trans:
#declare Cyl =
union {
cylinder { <0, 0, 0>, <0, 1, 0>, 0.05
pigment {color rgb <1, 0, 0>}
}
sphere {0, 0.15 pigment {rgb <0, 1, 0>}}
}
#declare TargetObj = sphere {0, 0.15 pigment {rgb <1, 1, 1>}}
//points at Target
#declare Target = <0, 1.5, 10>;
#declare CylPos = <1, 0, 1>;
#declare YAxis = Target - CylPos;
object {Cyl
Point_At_Trans(YAxis)
translate CylPos
}
object {TargetObj translate Target}
Thomas
Post a reply to this message
|
![](/i/fill.gif) |