POV-Ray : Newsgroups : povray.binaries.images : For Hugo. Irregular mesh smoothing idea. : Re: Yeaah! I got it to work!! Server Time
16 Aug 2024 14:17:10 EDT (-0400)
  Re: Yeaah! I got it to work!!  
From: Josh Seagoe
Date: 6 Mar 2002 15:37:31
Message: <3C867FF9.6040903@smileyface.com>

> 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
> 

Is that faster than using half the cross product of two of the sides? 
(cosidering vcross is internal...)

Something like:
area = vlength(vcross(P1-P2,P3-P2))/2;

-josh


Post a reply to this message

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