 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hi all,
I need a CSG object that basically has the shape of a cone, but with the
apex as a straight edge parallel to the base, with a length equal to the
diameter of the base. I tried all kinds of combinations but am unable to get
this right.
Any help will be much appreciated. Thanks a lot.
--
All the best,
Thomas
"Sic vive, tanquam cras moriturus, sic stude, quasi semper victurus."
Desiderius Erasmus
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I doubt this can be done with a (finite) CSG.
Just for clarity, what you need is something like this?
isosurface {
function { x*x + z*z*(1-y)*(1-y)/4 - (1-y)*(1-y)/4 }
contained_by { box { -1, 1 } }
}
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote:
> Hi all,
>
> I need a CSG object that basically has the shape of a cone, but with the
> apex as a straight edge parallel to the base, with a length equal to the
> diameter of the base. I tried all kinds of combinations but am unable to get
> this right.
>
> Any help will be much appreciated. Thanks a lot.
>
> --
> All the best,
>
> Thomas
>
> "Sic vive, tanquam cras moriturus, sic stude, quasi semper victurus."
> Desiderius Erasmus
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote in message
news:4a70161e@news.povray.org...
> Hi all,
>
> I need a CSG object that basically has the shape of a cone, but with the
> apex as a straight edge parallel to the base, with a length equal to the
> diameter of the base. I tried all kinds of combinations but am unable to
> get this right.
>
> Any help will be much appreciated. Thanks a lot.
>
> --
> All the best,
>
> Thomas
>
> "Sic vive, tanquam cras moriturus, sic stude, quasi semper victurus."
> Desiderius Erasmus
An Isosurface is the easiest and quickest and is technically CSGable.
Otherwise you can get the same shape by taking slices of a squashed sphere.
Both are illustrated below. Turning up the interval for the slicing gives
smoother results, but less interesting render times.
Regards,
Chris B.
camera {location <-2, 2.5, -1.5> look_at <1,0.25,0>}
light_source {<2,20,-15> color rgb 1}
isosurface {
function { (x*x*(y*y)+z*z-y*y)}
accuracy 0.001
max_gradient 4
contained_by{box{<-1,-1,-1>,<1,0,1>}}
pigment {rgb <1,1,0>}
finish {phong 0.5 phong_size 10}
translate y
translate x*3
}
#local Interval = 0.05;
merge {
#local I = 0;
#while (I<1)
intersection {
sphere {0,1}
box {<-1,0,-1><1,Interval,1>}
scale z*(1-I)
translate I*y
}
#local I = I+Interval;
#end
pigment {rgb 1}
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Chris B" <nom### [at] nomail com> wrote in message
news:4a702978@news.povray.org...
>
> "Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote in message
> news:4a70161e@news.povray.org...
>> Hi all,
>>
>> I need a CSG object that basically has the shape of a cone, but with the
>> apex as a straight edge parallel to the base, with a length equal to the
>> diameter of the base. I tried all kinds of combinations but am unable to
>> get this right.
>>
>> Any help will be much appreciated. Thanks a lot.
>
> An Isosurface is the easiest and quickest and is technically CSGable.
> Otherwise you can get the same shape by taking slices of a squashed
> sphere.
> Both are illustrated below. Turning up the interval for the slicing gives
> smoother results, but less interesting render times.
>
> Regards,
> Chris B.
>
While making a cup of tea it just occurred to me that you can also do it
with two sheared cones and a filler:
#include "transforms.inc"
merge {
cone {0,1,y,0 Shear_Trans(x,<-1,1,0>,z)}
cone {0,1,y,0 Shear_Trans(x,< 1,1,0>,z)}
intersection {
plane {< 0, 1, 1>,0 translate y}
plane {< 0, 1,-1>,0 translate y}
plane {<-1,-1, 0>,0}
plane {< 1,-1, 0>,0}
}
pigment {rgb 1}
}
Just goes to show that a good cup of tea can solve many problems :-)
Regards,
Chris B.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Chris B" <nom### [at] nomail com> wrote in message
news:4a7030f6@news.povray.org...
>
> it just occurred to me that you can also do it with two sheared cones and
> a filler:
This is a slightly different shape of course, but it still seems to fit the
description you gave.
Regards,
Chris B.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Roman, Chris, Thank you for the tips! I had not thought about the use of an
isosurface.
Chris, your cup of tea did it! That is exactly what I was looking for. I had
been struggling with cones but did not think of shearing them indeed.
You're the Boss! Thanks a lot.
Thomas
P.S. Drink more tea...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote:
> I need a CSG object that basically has the shape of a cone, but with the
> apex as a straight edge parallel to the base, with a length equal to the
> diameter of the base. I tried all kinds of combinations but am unable to get
> this right.
You might take two half-cones with point apexes, spread their apexes apart by
means of shearing matrix transformations, and fill the gap with a tetrahedrical
wedge.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
clipka wrote:
> You might take two half-cones with point apexes
Could one start with a cylinder instead? Since the top is as wide as the
bottom in at least one direction?
--
Darren New, San Diego CA, USA (PST)
"We'd like you to back-port all the changes in 2.0
back to version 1.0."
"We've done that already. We call it 2.0."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> Could one start with a cylinder instead? Since the top is as wide as the
> bottom in at least one direction?
Hm, yes, I guess a cylinder intersected with a wedge would fit Thomas' bill, too
(at least nominally, though it may not be what he looked for, due to the hard
edges this would produce)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
clipka wrote:
> Darren New <dne### [at] san rr com> wrote:
>> Could one start with a cylinder instead? Since the top is as wide as the
>> bottom in at least one direction?
>
> Hm, yes, I guess a cylinder intersected with a wedge would fit Thomas' bill, too
> (at least nominally, though it may not be what he looked for, due to the hard
> edges this would produce)
I was thinking more scale it from x=1.0 y=1.0 to x=1.0 y=0.0 as you move
from z=0 to z=1, if that makes sense. Not an intersection, but a non-linear
scaling.
--
Darren New, San Diego CA, USA (PST)
"We'd like you to back-port all the changes in 2.0
back to version 1.0."
"We've done that already. We call it 2.0."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le 29/07/2009 11:27, Thomas de Groot nous fit lire :
> Hi all,
>
> I need a CSG object that basically has the shape of a cone, but with the
> apex as a straight edge parallel to the base, with a length equal to the
> diameter of the base. I tried all kinds of combinations but am unable to get
> this right.
>
> Any help will be much appreciated. Thanks a lot.
>
Can you check "apex as a straight edge *parallel* to the base."
apex is a point.
On standard "right circular" cone, the apex is projected on the center of the base
circle.
Your description seems to describe an oblique circular cone, whose apex is projected
on a
point of the base circle. Distance between projection plane and apex being diameter of
the
circle.
You need a quadratic equation. Either as isosurface or quadric.
Isosurface has been provided, but a quadric might provide a different rendering time,
bounded by a unit box.
A x2 + B y2 + C z2 + D xy + E xz + F yz + G x + H y + I z + J = 0
A centered circle on <0,0,0>, radius 1: A=B=1, J=-1; D=0; G=0; H=0;
symetry implies E=0;
Remains C,F,I
with apex on <0,1,2>:
0+1+4C +2F+2I-1=0
4C+2F+2I=0
Also <0,1,1> on surface.
0+1+C+F+I-1=0
C+F+I=0
therefore C=0;
and F=-I
<0,0,1> also on surface
I-1=0 so I=1
intersection {
box{ <-1,-1,0>,<1,1,2> }
quadric { <1,1,0>,<0,0,-1>,<0,0,1>,-1}
}
have a nice day.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> I was thinking more scale it from x=1.0 y=1.0 to x=1.0 y=0.0 as you move
> from z=0 to z=1, if that makes sense. Not an intersection, but a non-linear
> scaling.
Here's the catch: You can't do non-linear scaling in POV-Ray (unless you use
parametrics, isosurfaces or some such).
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Further thinking about your description, if apex really a segment parallel to base:
check volume 3 of news://news.povray.org:119/496f790c@news.povray.org
(title: "6 volumes" OP: Le_Forgeron, Date 15 january 2009)
It's a conocuneus, a quartic.
Toothpath tube classical end.
intersection {
box {<0,-1,-1><2,1,1>}
quartic {
<0,0,0,0,0, 0,0,1,0,-1,
0,0,0,0,0, 0,0,0,0,0,
0,0,0,0,0, 4,0,0,0,0,
0,0,0,0,0> }
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Darren New" <dne### [at] san rr com> wrote in message
news:4a7078d0$1@news.povray.org...
> clipka wrote:
>> Darren New <dne### [at] san rr com> wrote:
>>> Could one start with a cylinder instead? Since the top is as wide as the
>>> bottom in at least one direction?
>>
>> Hm, yes, I guess a cylinder intersected with a wedge would fit Thomas'
>> bill, too
>> (at least nominally, though it may not be what he looked for, due to the
>> hard
>> edges this would produce)
>
> I was thinking more scale it from x=1.0 y=1.0 to x=1.0 y=0.0 as you move
> from z=0 to z=1, if that makes sense. Not an intersection, but a
> non-linear scaling.
>
That's what two of the three examples I posted this morning do, one using an
Isosurface, the other using slices of a sphere, (but a cylinder would work
the same). The third example I posted used the method Clipka outlined, which
generates a slightly different shaped surface.
I think there is at least one more way without using shear, which is to
scale a cone non uniformly, rotate and slice it, such that the horizontal
section becomes circular while the edge is vertical, then fill out the
middle as before.
Regards,
Chris B.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Chris B" <nom### [at] nomail com> wrote in message
news:4a70803b@news.povray.org...
>
> I think there is at least one more way without using shear, which is to
> scale a cone non uniformly, rotate and slice it, such that the horizontal
> section becomes circular while the edge is vertical, then fill out the
> middle as before.
>
In fact I've tried it and I don't think my fourth way works because you
always end up with a parabolic conic section.
Nevertheless, Le Forgeron looks as though he's still churning out more
alternatives :-)
Geometry questions seem popular. Any more ;)
Regards,
Chris B.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Toothpaste tube end indeed covers the bill :-)
Thomas
"Le_Forgeron" <jgr### [at] free fr> schreef in bericht
news:4a707f48$1@news.povray.org...
> Further thinking about your description, if apex really a segment parallel
> to base:
>
> check volume 3 of news://news.povray.org:119/496f790c@news.povray.org
> (title: "6 volumes" OP: Le_Forgeron, Date 15 january 2009)
>
> It's a conocuneus, a quartic.
> Toothpath tube classical end.
>
> intersection {
> box {<0,-1,-1><2,1,1>}
> quartic {
> <0,0,0,0,0, 0,0,1,0,-1,
> 0,0,0,0,0, 0,0,0,0,0,
> 0,0,0,0,0, 4,0,0,0,0,
> 0,0,0,0,0> }
> }
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Le_Forgeron" <jgr### [at] free fr> schreef in bericht
news:4a707f48$1@news.povray.org...
> It's a conocuneus, a quartic.
> Toothpath tube classical end.
>
> intersection {
> box {<0,-1,-1><2,1,1>}
> quartic {
> <0,0,0,0,0, 0,0,1,0,-1,
> 0,0,0,0,0, 0,0,0,0,0,
> 0,0,0,0,0, 4,0,0,0,0,
> 0,0,0,0,0> }
> }
This is now the most elegant solution. Thanks a lot!
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Le_Forgeron" <jgr### [at] free fr> schreef in bericht
news:4a707f48$1@news.povray.org...
> Further thinking about your description, if apex really a segment parallel
> to base:
>
> check volume 3 of news://news.povray.org:119/496f790c@news.povray.org
> (title: "6 volumes" OP: Le_Forgeron, Date 15 january 2009)
>
Maybe me, but this reference is not pointing to anything on news.povray.org
....
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> schreef in bericht
news:4a7d349d$1@news.povray.org...
>
> "Le_Forgeron" <jgr### [at] free fr> schreef in bericht
> news:4a707f48$1@news.povray.org...
>> check volume 3 of news://news.povray.org:119/496f790c@news.povray.org
>> (title: "6 volumes" OP: Le_Forgeron, Date 15 january 2009)
>
Seriously, I cannot find any message related to this on the server in any
n.g. (I used Search). Neither title nor date refer to a message. Any help?
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote in message
news:4a7fcc36$1@news.povray.org...
>
> "Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> schreef in bericht
> news:4a7d349d$1@news.povray.org...
>>
>> "Le_Forgeron" <jgr### [at] free fr> schreef in bericht
>> news:4a707f48$1@news.povray.org...
>>> check volume 3 of news://news.povray.org:119/496f790c@news.povray.org
>>> (title: "6 volumes" OP: Le_Forgeron, Date 15 january 2009)
>>
>
> Seriously, I cannot find any message related to this on the server in any
> n.g. (I used Search). Neither title nor date refer to a message. Any help?
>
> Thomas
>
Hi Thomas.
See:
From: "Le_Forgeron" <jgr### [at] free fr>
Newsgroups: povray.binaries.images
Sent: Thursday, January 15, 2009 6:57 PM
Subject: 6 volumes
The URL above incorporated the port number (119) in a way that screwed up
the link on my newsreader (and I imagine on yours too). It's the default
port anyway, so when I removed that it popped up ok in the Windows Mail
client on Vista. ie news://news.povray.org/496f790c@news.povray.org
It's also available through the browser interface at:
http://news.povray.org/povray.binaries.images/thread/%3C496f790c%40news.povray.org%3E/?ttop=318396&toff=250
It seems that Le Forgeron foresaw your very question at the start of the
year. Next Psychic challenger please :-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Chris B" <nom### [at] nomail com> schreef in bericht
news:4a7fdf72$1@news.povray.org...
> Hi Thomas.
> See:
>
> From: "Le_Forgeron" <jgr### [at] free fr>
> Newsgroups: povray.binaries.images
> Sent: Thursday, January 15, 2009 6:57 PM
> Subject: 6 volumes
>
> The URL above incorporated the port number (119) in a way that screwed up
> the link on my newsreader (and I imagine on yours too). It's the default
> port anyway, so when I removed that it popped up ok in the Windows Mail
> client on Vista. ie news://news.povray.org/496f790c@news.povray.org
> It's also available through the browser interface at:
>
http://news.povray.org/povray.binaries.images/thread/%3C496f790c%40news.povray.org%3E/?ttop=318396&toff=250
>
> It seems that Le Forgeron foresaw your very question at the start of the
> year. Next Psychic challenger please :-)
Thanks Chris. I also found it at last through the browser interface. My
primary problem was in fact that all older messages on my news reader were
gone so that my search didn't give any results. I just then realised I had
to load them back up again to access them. Summer heat makes the brain
sluggish :-)
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |