POV-Ray : Newsgroups : povray.general : Semi Scaled cone Server Time
15 Nov 2024 03:21:44 EST (-0500)
  Semi Scaled cone (Message 1 to 5 of 5)  
From: Barehunter
Subject: Semi Scaled cone
Date: 13 Dec 2004 04:15:00
Message: <web.41bd5cb0e6a71ad6362130900@news.povray.org>
Hello. As I do pictures I keep having this same problem. I need to make a
cone that has a scale applied to only one end. I'll give an example. I want
to make a Forearm. One end is at the elbow and the other at the wrist. Now
the elbow end can have a normal diameter, but the wrist end will need to be
a little flattened. I use window version. Any advice?


Post a reply to this message

From: Alain
Subject: Re: Semi Scaled cone
Date: 13 Dec 2004 05:54:31
Message: <41bd74e7$1@news.povray.org>
Barehunter nous apporta ses lumieres ainsi en ce 2004-12-13 04:11... :

>Hello. As I do pictures I keep having this same problem. I need to make a
>cone that has a scale applied to only one end. I'll give an example. I want
>to make a Forearm. One end is at the elbow and the other at the wrist. Now
>the elbow end can have a normal diameter, but the wrist end will need to be
>a little flattened. I use window version. Any advice?
>
>
>  
>
Try with a blob made out of many spheres. Those at elbow level been 
unscaled, changing progressively to the proportion you want at the wrist 
level. Both end will be rounded, but you can flaten those with: 1- a 
negative strenght component at each end, or 2- intersecting the blob 
with a box of apopriate size.

Alain


Post a reply to this message

From: Mike Williams
Subject: Re: Semi Scaled cone
Date: 13 Dec 2004 08:30:14
Message: <JXo6pDAclZvBFw3p@econym.demon.co.uk>
Wasn't it Barehunter who wrote:
>Hello. As I do pictures I keep having this same problem. I need to make a
>cone that has a scale applied to only one end. I'll give an example. I want
>to make a Forearm. One end is at the elbow and the other at the wrist. Now
>the elbow end can have a normal diameter, but the wrist end will need to be
>a little flattened. I use window version. Any advice?

You can make something a bit like that from a cubic.

Let's consider the general case where you want to have elliptical ends
given by the 2d equations

        A2x2  +  B2y2  -  1  =  0
        C2x2  +  D2y2  -  1  =  0

then that can be achieved by
 cubic {<0,0,C*C-A*A,A*A,0,0,0,0,0,0,0,D*D-B*B,B*B,0,0,0,0,0,0,-1>}
that expands to
       (C2-A2)zx2 +A2x2 +(D2-B2)zy2 + B2y2 -1 = 0
so when z=0 you get
                   A2x2             + B2y2 -1 = 0
and when z=1 the A2x2s and B2y2s cancel out leaving
        C2x2            +D2y2              -1 = 0

You then need to chop off the bits outside the range, and may want to
translate and stretch it, something like this. The "sturm" may be
required for some values of A,B,C,D.

intersection {
  box {<-2,-2,0><2,2,1>}
  cubic {
    <0,0,C*C-A*A,A*A,0,0,0,0,0,0,0,D*D-B*B,B*B,0,0,0,0,0,0,-1> 
    sturm
  }
  pigment {rgb 1}
  translate -0.5*z
  scale <1,1,10>
}

To have a circle at one end, set A and B to the same value.

This doesn't quite do exactly what you want because the sides aren't
perfectly straight like they would be in a true cone.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Warp
Subject: Re: Semi Scaled cone
Date: 13 Dec 2004 09:32:50
Message: <41bda812@news.povray.org>
Mike Williams <nos### [at] econymdemoncouk> wrote:
> This doesn't quite do exactly what you want because the sides aren't
> perfectly straight like they would be in a true cone.

  If you want an exact cone with two ellipses as ends, use Supercone() in
shapes.inc.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Barehunter
Subject: Re: Semi Scaled cone
Date: 17 Dec 2004 23:00:01
Message: <web.41c3aac4fcb36a407e4f500@news.povray.org>
>   If you want an exact cone with two ellipses as ends, use Supercone() in
> shapes.inc.
Supercone! I never messed with macros before but I'll definitely try this
one thanks.


Post a reply to this message

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