POV-Ray : Newsgroups : povray.newusers : making a curved cone, like an animals horn : Re: making a curved cone, like an animals horn Server Time
28 Jul 2024 14:19:46 EDT (-0400)
  Re: making a curved cone, like an animals horn  
From: Mike the Elder
Date: 5 Nov 2008 11:55:00
Message: <web.4911cf38ceb02858ad9dd8b40@news.povray.org>
"Dean" <d.d### [at] astonacuk> wrote:
> Hi, how would I make a curved cone, like an animals horn?
>
> thanks
>
> Dean

Sometimes, using an actual bunch of spheres instead of a sphere sweep can give
the object a "segmented" look which could be desirable in some cases,  I've
kept the example very simple to make it easier to tinker with.

see example here:
http://news.povray.org/povray.binaries.images/attachment/%3Cweb.4911cd9bd0733abcad9dd8b40%40news.povray.org%3E/ezhorn.j
pg

Code example below:

// Quick Routine for making segemented horns

camera{location<0,15,-90>
direction 4.8*z right x*image_width/image_height
look_at<0,2,0>}


light_source{<-100,200,-500> rgb<1,1,1>}

/* The Sky */ sky_sphere{pigment{gradient y colour_map{
  [0.0 rgb<.3,.3,.8>]
  [.3 rgb <.1,.13,.6>]
  [.7 rgb<.1,.13,.6>]
  [1 rgb<.3,.3,.8>]}}
}

#declare EZWhite=texture{pigment{rgb<.95,.97,1>}
finish{ambient.4 diffuse .5 reflection 0 phong .1 phong_size 15}
}

// SET CHARACTERISTICS OF HORN HERE
#declare NoS=140; //Number of Segments
#declare HoS=.3;  //Height of Segment
#declare SoA=200; //Sweep of Arc (Degrees)
#declare HowP=.1; //How Pointy? (0 = sharp point)

#declare POS=0; #while(POS<=1)
sphere{0,2 scale <1-(1-HowP)*POS,HoS,1-(1-HowP)*POS> texture {EZWhite} translate
<-8,0,0> rotate (30 - POS*SoA)*z}
#declare POS=POS+1/NoS; #end


/* Small bits of random rotation could be applied to the segment along the x and
z axes prior to its translation
and main rotation to give the "horn" a more organic, less mechanical look.*/


Post a reply to this message

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