POV-Ray : Newsgroups : povray.newusers : making a curved cone, like an animals horn Server Time
31 Oct 2024 10:20:10 EDT (-0400)
  making a curved cone, like an animals horn (Message 1 to 3 of 3)  
From: Dean
Subject: making a curved cone, like an animals horn
Date: 5 Nov 2008 08:10:01
Message: <web.49119a13601e898e5d09e7650@news.povray.org>
Hi, how would I make a curved cone, like an animals horn?

thanks

Dean


Post a reply to this message

From: Mike Williams
Subject: Re: making a curved cone, like an animals horn
Date: 5 Nov 2008 09:07:50
Message: <wz4jL3EliaEJFwaO@econym.demon.co.uk>
Wasn't it Dean who wrote:
>Hi, how would I make a curved cone, like an animals horn?

I tend to use a sphere_sweep.

For example:

    sphere_sweep{b_spline,7
    <0,0,0>, 0.19,
    <0,0,0>, 0.19,
    <-1,0,0>,0.14,
    <-1.5,0.5,0>,0.12,
    <-1.6,1,-0.2>,0.05,
    <-1.5,1.2,-0.4>,0.04
    <-1.5,1.2,-0.4>,0.04
    }

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Mike the Elder
Subject: Re: making a curved cone, like an animals horn
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.