POV-Ray : Newsgroups : povray.general : Wandering trace Server Time
29 Mar 2024 05:06:45 EDT (-0400)
  Wandering trace (Message 1 to 3 of 3)  
From: ingo
Subject: Wandering trace
Date: 29 Sep 2016 05:19:44
Message: <57ecdcb0$1@news.povray.org>
In the scene below I'd expect the x- and z-componets of the 
Campos-vector to be identical to those of the Loc-vector. The markers 
should be coincident. But I may be wrong, it's been a while...

Ingo (who can't get this sad piece of newsreader to search old posts)

-----8<-----tracetest.pov----8<-----

#version 3.7;
global_settings{ assumed_gamma 1.0 }
#default{finish{ ambient 0.1 diffuse 0.9 }}

camera {
     perspective
     angle 35
     location  <0.0 , 80.0 ,-80.0>
     right
     x*image_width/image_height
     look_at <0,0,0>
}

light_source{<3000,3000,-3000> rgb 1}

#declare Island = height_field{
     png "Mount1.png"
     smooth
     double_illuminate
     translate<-0.5,-0.0,-0.5>
     scale<50,7,50>
     pigment { color rgb <0.82,0.6,0.4>}
}

#declare Loc = <5, 20, 5>;
#declare Down = Loc*<1,-1,1>;
#declare Norm = <0,0,0>;
#declare Campos = trace(Island, Loc, Down, Norm);

#debug concat("Loc         <",vstr(3,Loc,", ",0,3),">\n")
#debug concat("Down        <",vstr(3,Down,", ",0,3),">\n")
#debug concat("Campos      <",vstr(3,Campos,", ",0,3),">\n")
#debug concat("Campos Norm <",vstr(3,Norm,", ",0,3),">\n")

#declare MarkerLocDown = union{
     cylinder{
         Loc,Down,.1
     }
     sphere{
         Loc,.3
     }
     pigment{rgb <0,1,0>}
}
#declare MarkerTrace = union{
     cylinder{
         Loc,Campos,.1
     }
     sphere{
         Loc,.3
     }
     pigment{rgb <1,0,0>}
}

object{Island}
object{MarkerLocDown}
object{MarkerTrace}


Post a reply to this message

From: William F Pokorny
Subject: Re: Wandering trace
Date: 29 Sep 2016 09:54:41
Message: <57ed1d21$1@news.povray.org>
On 09/29/2016 05:19 AM, ingo wrote:
> In the scene below I'd expect the x- and z-componets of the
> Campos-vector to be identical to those of the Loc-vector. The markers
> should be coincident. But I may be wrong, it's been a while...
>
> Ingo (who can't get this sad piece of newsreader to search old posts)
>
> -----8<-----tracetest.pov----8<-----
>
> #version 3.7;
> global_settings{ assumed_gamma 1.0 }
> #default{finish{ ambient 0.1 diffuse 0.9 }}
>
> camera {
>     perspective
>     angle 35
>     location  <0.0 , 80.0 ,-80.0>
>     right
>     x*image_width/image_height
>     look_at <0,0,0>
> }
>
> light_source{<3000,3000,-3000> rgb 1}
>
> #declare Island = height_field{
>     png "Mount1.png"
>     smooth
>     double_illuminate
>     translate<-0.5,-0.0,-0.5>
>     scale<50,7,50>
>     pigment { color rgb <0.82,0.6,0.4>}
> }
>
> #declare Loc = <5, 20, 5>;
> #declare Down = Loc*<1,-1,1>;
> #declare Norm = <0,0,0>;
> #declare Campos = trace(Island, Loc, Down, Norm);
>
> #debug concat("Loc         <",vstr(3,Loc,", ",0,3),">\n")
> #debug concat("Down        <",vstr(3,Down,", ",0,3),">\n")
> #debug concat("Campos      <",vstr(3,Campos,", ",0,3),">\n")
> #debug concat("Campos Norm <",vstr(3,Norm,", ",0,3),">\n")
>
> #declare MarkerLocDown = union{
>     cylinder{
>         Loc,Down,.1
>     }
>     sphere{
>         Loc,.3
>     }
>     pigment{rgb <0,1,0>}
> }
> #declare MarkerTrace = union{
>     cylinder{
>         Loc,Campos,.1
>     }
>     sphere{
>         Loc,.3
>     }
>     pigment{rgb <1,0,0>}
> }
>
> object{Island}
> object{MarkerLocDown}
> object{MarkerTrace}

The direction vector on the trace is local to "Loc" so I think you want 
something there like:

#declare Down = <0,-1,0>;

Of course use of Down in MarkerLocDown then needs to be changed to say 
"LocDown".

#declare LocDown = Loc*<1,-1,1>;

if you want both expected and trace cylinders to be coincident.

Bill P.


Post a reply to this message

From: ingo
Subject: Re: Wandering trace
Date: 29 Sep 2016 12:11:18
Message: <57ed3d26$1@news.povray.org>
Got it going,
it 'traces' in a direction, not to a point,

Ingo


Post a reply to this message

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