|
![](/i/fill.gif) |
If your Licht object is a light_source you should also add an Y offset to the
position.
Otherwise your light_source is located exacly on the Meeresgrund object, this could
cause some problems.
So here's the new code with an Y offset:
----------8<----------8<----------8<----------8<----------8<----------
#declare Normal=< 0.0, 0.0, 0.0 >;
#declare Angle=30.0;
#declare YOffset = 10; // The lights are located YOffset
// units above the Meeresgrund object
#while(Angle<360)
#declare Location=< -25.0, 100.0, 0.0 > rotate < 0.0, Angle, 0.0 >;
#declare LPos=trace( Meeresgrund, Location, -y, Normal );
object {Licht translate LPos + <0,YOffset,0> }
declare Angle=Angle+30;
#end
----------8<----------8<----------8<----------8<----------8<----------
Joerg wrote:
> It should work like this:
>
> ----------8<----------8<----------8<----------8<----------8<----------
> #declare Normal=< 0.0, 0.0, 0.0 >;
>
> #declare Angle=30.0;
>
> #while(Angle<360)
> #declare Location=< -25.0, 100.0, 0.0 > rotate < 0.0, Angle, 0.0 >;
> #declare LPos=trace( Meeresgrund, Location, -y, Normal );
> object {Licht translate LPos }
> declare Angle=Angle+30;
> #end
> ----------8<----------8<----------8<----------8<----------8<----------
>
>
>
>
> Sven Littkowski wrote:
>
>> Here a sample of my scene:
>>
>> #declare Normal=< 0.0, 0.0, 0.0 >;
>>
>> #declare Angle=30.0;
>>
>> #while(Angle<360)
>> #declare Location=< -25.0, 100.0, 0.0 > rotate < 0.0, Angle, 0.0 >;
>> #declare Boden=trace( Meeresgrund, Location, -y, Normal );
>> object {Licht translate < -25.0, Boden.y, 0.0 > rotate < 0.0, Angle,
>> 0.0 > }
>> declare Angle=Angle+30;
>> #end
>>
>> I intent to place some objects (called "Licht") in a circle. Since the
>> underground is a height_field, I want to use Trace to get the proper Y
>> coordinate of the current location. There I fail. I don't know
>> exactly, how to properly define the location for Trace. Please see
>> above. of course, that returns an error message. How to do it better?
>>
>> Thanks,
>>
>> Sven
>>
Post a reply to this message
|
![](/i/fill.gif) |