POV-Ray : Newsgroups : povray.text.scene-files : bent cone using striscia : bent cone using striscia Server Time
8 Jul 2024 09:11:52 EDT (-0400)
  bent cone using striscia  
From: David Wilkinson
Date: 21 Feb 2001 10:31:06
Message: <rjn79t4v03fu897amnhojc2i0hsjrkr0qp@4ax.com>
// This is the POV code for the bent cone posted on p.b.i for Jason Scott

//  Horn using Striscia macros developed by Daniele Varrazzo <pir### [at] officineit>
//  Striscia is still available at http://members.nbci.com/dvarrazzo/epov.htm
//  David Wilkinson 21 Feb 2001

#version 3.1

#include "Striscia.inc"
#include "Spline1.inc"
#include "SplLib.inc"
#include "StrVarFs.inc"

global_settings
{
  assumed_gamma 1.0
}

camera
{
  location  <0, 1, -4>
  right     4/3*x
  look_at   <0,1.6,0>
}

light_source
{
  <-30, 30, -30>
  color rgb 1
}

// calculate a circular arc path
#declare Radius1=4

// 70 degree arc
#declare Path = splCubicSpline(array[8] {
        <0, Radius1, 0> Radius1*<sin(radians(10)),cos(radians(10)), 0>,
Radius1*<sin(radians(20)),cos(radians(20)), 0>,
         Radius1*<sin(radians(30)),cos(radians(30)),
0>,Radius1*<sin(radians(40)),cos(radians(40)), 0>, 
        Radius1*<sin(radians(50)),cos(radians(50)),
0>,Radius1*<sin(radians(60)),cos(radians(60)), 0>,
        Radius1*<sin(radians(70)),cos(radians(70)), 0>})
  

SetPathSpline(Path)

#declare CrossSection = splCircle(4)  // circular cross section
SetShapeSpline(CrossSection)

#declare Scale1=1.5  // this decides the taper of the horn

#declare ConeSlope = slpSlope(array[2] 
   {<0, Scale1*0.01, 0>,  <gPathLength, Scale1*0.2, 0>
})
AddShapeTransform(UNIF_SCALE, ConeSlope)  // uniform taper

#declare Horn =
union {
object { Striscia(UNION)  }
 // small sphere at tip of horn
 sphere {  Radius1*<sin(radians(10)),cos(radians(10)),0> Scale1*0.01 } 
 pigment { checker scale 0.2}
 rotate -z*30 
 translate -Radius1*x
}

object { Horn }

----------------------
dav### [at] hamiltonitecom
http://hamiltonite.com/


Post a reply to this message

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