POV-Ray : Newsgroups : povray.general : Req: Candy Cane : Re: Req: Candy Cane Server Time
11 Aug 2024 21:19:16 EDT (-0400)
  Re: Req: Candy Cane  
From: Matt Giwer
Date: 28 Jun 1999 15:21:30
Message: <3777CB41.1F2054F8@giwersworld.org>
Ken wrote:
> 
> Hi ?
> 
>   Does anyone have a stripped candy cane they could share with me. I
> can model the thing all right but getting the stripe to wrap around the
> bend properly is giving me epileptic fits. I prefer a non patch solution
> for this if at all possible.
> 
> Thank you in advance for any help you may have to offer.

	If you map the colors instead of letting them be the spectrum
colors something like this should work. See the COMMENT!!! in the
file. 
The result is the first equation image on the page at the end.

// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3.1
// Desc: Basic Scene Example
// Date: mm/dd/yy
// Auth: ?[esp]
//

#version 3.1

#include "colors.inc"

global_settings
{
  assumed_gamma 2.2
}

// ----------------------------------------
camera
{
  location  <0.0, 9, -9.0>*3
  direction 1.5*z
  right     4/3*x
  look_at   <0.0, 0.0,  0.0>
}
/*
sky_sphere
{
  pigment
  {
    gradient y
    color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
  }
} */

light_source
{
  0*x // light's position (translated below)
  color red .50  green .50  blue 0.50  // light's color
  translate <-30, 30, -30>
}

light_source
{
  0*x // light's position (translated below)
  color red .50  green .50  blue .50  // light's color
  translate <30, 30, -30>
}

// ----------------------------------------
//plane { y, -1 pigment {color rgb <0.7,0.5,0.3>}}

//sphere { 0.0, 1 texture {pigment {radial frequency 8}
finish{specular 1}} }

  
#declare  tortor =union {
#local count1 = 0 ;
#local maximum =1500;
//#declare count = 1;
#while (count1 < maximum)    
   
//box 
torus
//superellipsoid {<0.8,0.2>
{  0.8, 0.2
  texture {pigment {radial frequency count1/100} /* COMMENT!!!
play with this line first */ 
   finish{specular 1}
  rotate y*count1*(360/maximum) }
   //interior {ior 1.8}   
  rotate x*count1*360/maximum/5 
  translate <count1*360/maximum/25,0,0>
  translate
<sin(2*pi*count1/maximum)/cos(2*pi*count1/maximum),0,0>
  rotate y*count1*(360/maximum)
}
                   
#declare count1 = count1 +.5;
#end
                  
}//end union  

tortor


-- 
<blink>------------------------------------</blink>

http://www.giwersworld.org/artsii/

Finally up on 99/06/22


Post a reply to this message


Attachments:
Download 'us-ascii' (1 KB)

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