POV-Ray : Newsgroups : povray.general : triangulation.inc Server Time
5 Nov 2024 05:21:35 EST (-0500)
  triangulation.inc (Message 1 to 2 of 2)  
From: alphaQuad
Subject: triangulation.inc
Date: 3 Oct 2007 15:05:00
Message: <web.4703e7aec5d8d2ff2b1f608f0@news.povray.org>
comments needed I suppose. is it true there are no local vars in functions?

also, do many of these funcs/macros exist already? and which ones?


my latest triangulation.inc:
******************************************************************************
Declare this page:

3D Macros:
  incenter_v3(v1,v2,v3)
  centroid(v1,v2,v3)
  ccenter(v1,v2,v3)      circumcenter
  orthocenter(v1,v2,v3)
  midpoint(v1,v2)

Functions:
  inneradius(a,b,c)
  circumradius(a,b,c)

  sss_area(a,b,c)
  sas_area(s,a,s2)
  bh_area(b,h)           Base Height

  sss_height(a,b,c)      height to side2
  sas_cos(s,a,s2)        Side Angle Side - solve length of missing side

  aas_sin(a,b,s)         AAS solve opposing side of angle2 (b)
  asa_sin(a,s,b)         ASA solve opposing side of angle2 (b)
  sss_cos(a,b,c)         SSS solve angle opposite side2    (b)
  ssa_acute(s,s2,a)      SSA solve angle opposite side2
  ssa_obtuse             not today


*******************************************************************************


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: triangulation.inc
Date: 3 Oct 2007 18:46:11
Message: <47041bb3@news.povray.org>

> 
> comments needed I suppose. is it true there are no local vars in functions?

Use #macro's if you need local variables. Functions can only have math, 
it's hard to put any "logic" on them (they are functions in the 
*mathematical* sense, not the programming one).


Post a reply to this message

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