POV-Ray : Newsgroups : povray.general : rolled up maps : Re: rolled up maps Server Time
1 Aug 2024 08:16:34 EDT (-0400)
  Re: rolled up maps  
From: Jim Holsenback
Date: 15 Jan 2006 05:55:01
Message: <43ca2a05@news.povray.org>
"Mike Williams" <nos### [at] econymdemoncouk> wrote in message 
news:Um8### [at] econymdemoncouk...
> You might be able to tweak this into what you need.

  haha .... how come i figured it would be you to reply ....

> It uses Ingo Janssen's Param.inc macro, which creates a mesh with uv
> mapping, so it should be possible to paint a map onto it
>
> Get param.inc from http://members.home.nl/seedseven/

 i took a look at this sometime ago and went .... what???!??? now that i've 
been pov'ing for a bit i'm feeling a bit more "froggy" so i'll give 'er a 
leap .... thanks again Mike .... Ciao

> global_settings {assumed_gamma 1.0}
>
> #declare R1=0.2;        //inner radius right end
> #declare R2=1;          //outer radius right end
> #declare R3=0.1;        //inner radius left end
> #declare R4=1.5;        //outer radius left end
> #declare DX=3;          //length of straight bit
> #declare F1 = 5*pi;     //frequency of right end: use (4n+1)*pi
> #declare F2 = 14*pi;    //frequency of left end:  use (4n+2)*pi
>
> camera { location  <-5, 3, -10> look_at <-DX/2,0,0> angle 28}
> light_source {<-100,200,-500> colour rgb 1}
>
> // An open 2D spline
> #declare S = function {
>   spline {
>     linear_spline
>     // right end
>     #declare T=0;
>     #while (T<0.5)
>       #declare X=cos(T*F1)*((R1*(0.5-T))+(R2*T));
>       #declare Y=-sin(T*F1)*((R1*(0.5-T))+(R2*T));
>       T, <X,Y>,
>       #declare T=T+0.002;
>     #end
>     // left end
>     #while (T<1)
>       #declare X=sin(T*F2)*((R4*(1-T))+(R3*(T-0.5))) - DX;
>       #declare Y=cos(T*F2)*((R4*(1-T))+(R3*(T-0.5)));
>       T, <X,Y>,
>       #declare T=T+0.002;
>     #end
>   }
> }
>
>
> #declare Fx  = function(u,v) {S(u).x}
> #declare Fy  = function(u,v) {S(u).y}
> #declare Fz  = function(u,v) {v}
>
> #include "param.inc"
>
> object {Parametric(Fx,Fy,Fz,<0,-2>,<1,2>,400,2,"")
>        pigment {rgb 1}
> }
>
> -- 
> Mike Williams
> Gentleman of Leisure


Post a reply to this message

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