POV-Ray : Newsgroups : povray.general : Problem shaping a CSG object : Re: Problem shaping a CSG object Server Time
30 Jul 2024 12:23:05 EDT (-0400)
  Re: Problem shaping a CSG object  
From: Le Forgeron
Date: 29 Jul 2009 12:32:04
Message: <4a707984@news.povray.org>
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

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