POV-Ray : Newsgroups : povray.newusers : Profile along curve. Yes? : Re: Profile along curve. Yes? Server Time
13 May 2024 18:55:39 EDT (-0400)
  Re: Profile along curve. Yes?  
From: Fractracer
Date: 5 Jan 2014 14:35:01
Message: <web.52c9b2d0b097185d9d0caeb40@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> Hi.
> Sorry!
>
> Now I want to use coordinates NurbsCurve for while
> I use an example from James Holsenback in this topic:
>
> global_settings {
>     assumed_gamma 1
>     max_trace_level 3
> }
> background {rgbt<0.0509, 0.0509, 0.0509, 0>}
>
> #declare TableLegShape =
> spline {
> cubic_spline
>  0/10 <-1.796,-0.2653,0.5108>
>  1/10 <-1.627,-0.8928,0.7868>
>  2/10 <0.01627,-1.644,-0.4275>
>  3/10 <1.422,-0.6246,-2.678>
>  4/10 <-0.6351,0.9274,-1.604>
>  5/10 <-1.659,0.5656,-0.2417>
>  6/10 <-1.5,0,0>
>  7/10 <-1,-4.371e-08,-1>
>  8/10 <1,-4.371e-08,-1>
>  9/10 <1.5,0,0>
>  }
>
> // the shape that will follow the profile
> #declare TableLegSegment =
> union {
>  sphere {0,0.1 translate z*0.125}
>  cylinder {<0,0,-0.125>, <0,0,0.125>, 0.1}
>  sphere {0,0.1 translate -z*0.125}
>  }
>
 Your final object is only here. You do add a line after the declaration.

> // the final shape
> #declare TableLeg =
> #declare ctr = 0;
> union {
>  #while (ctr < 1)
>   object { TableLegSegment rotate z*0
>    translate TableLegShape (ctr)
>    }
>   #declare ctr = ctr + 0.00025;
>  #end
>  }
>
ex here:
object {
     TableLeg
}

> light_source {
>     <4.08,5.9,-1.01>
>     color rgb<1, 1, 1>
> }
> #declare Camera_Location = <7.481132, 5.343666, 6.507640>;
> #declare Camera_Look_At = <0, 0, -1>;
> #declare Camera_Angle = 49.134343;
> #include "transforms.inc"
> #declare Cam_V = Camera_Look_At - Camera_Location;
> #declare Cam_Ho = sqrt(pow(Cam_V.x,2)+pow(Cam_V.z ,2));
> #declare Cam_Y = Camera_Look_At.y - Camera_Location.y;
> camera {
>     angle  Camera_Angle
>     right <-1.6077777759896383, 0, 0>
>     location  <0,Camera_Look_At.y,-Cam_Ho>
>     matrix<1,0,0, 0,1,0, 0,Cam_Y/Cam_Ho,1, 0,0,0>
>     Reorient_Trans(z,<Cam_V.x,0,Cam_V.z>)
>     translate<Camera_Look_At.x+2,1.25,Camera_Look_At.z+2>
> }
>


Post a reply to this message

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