|
![](/i/fill.gif) |
On Wed, 6 Mar 2002 09:11:10 -0600, "Shay" <sah### [at] simcoparts com> wrote:
> For a mesh with different angles at the corners of a "square," an angle must
> be found for each triangle. There are two ways I can think of to do this.
> Both are slow, but one should shurely be faster than the other.
universal formula for area of triangle:
S=sqrt(p*(p-a)*(p-b)*(p-c))
where a,b,c are lengths of edges and p is half of perimeter = (a+b+c)/2
as you see you don't need angle at all
ABX
--
disc{z,-z 5#macro O()asc(substr("-+((1*(,1,/.-,*/(,&.323/'1"e,1))*.1-4#declare
e=e-1;#end#local e=26;pigment{#local g=function(_){ceil(_)-_}function#local//X
k=function{pattern{object{sphere_sweep{linear_spline 13#while(e>0)<O(),O()//AB
>.01#end}}}}{k(g(atan2(x,y)),g(ln((y+x)^2+1e-5)),0)}}finish{ambient 1}}//POV35
Post a reply to this message
|
![](/i/fill.gif) |