'DOMECALC.O2BAS
===============

'03/09/2023
'
/*
NAMES
  face
  edge
  node
  height
  width
  head
  body
  tail
  wing
  wing width
  base width
  top width
  base angle
  top angle
  base width
  top width
  wing width
  tail width
  head width
  body height
  angular defect / excess

*/
'
uses console
uses MathTrig

'
/*
'
heading "Construction Details"
'
float a,b,c,d,e,f,g,h,i,j,k
float p,q,r,s,t,u,v,w,x,y,z
float h1,h2
float w1,w2
a=5
r=100
show r "scale"
show a "angular defect"
b=1/2
h1=cosd(30-a)
h2=cosd(30+a+a)
showr h1 "height 1"
showr h2 "height 2"
w=sind(30-a)
u=sind(30+a+a)
t=b+w-u
showr w "wing width"
showr b "base"
showr t "top"
*/
'
'/*
'
float a,b,c,d,e,f,g
float el,ht,r,s,st,sw,t
int i,j,k,n
r=100
n=12
el=80
heading "inputs"
show r  "radius"
show n  "sides"
show el "elevation"
heading "lengths"
a=rad (180/n)
e=rad(el)
s=sin(a)
c=cos(a)
sw=c*s
d=c*c
f=1.0-d
st=1/cos(e)
'show c
'show s
'show d
'show f
float sd,sf,sh,sr
sr=st
sd=d*st
sf=f*st
sh=sqr((sw*sw)+(sf*sf))
ht=tan(e)
showr ht  "height"
showr sr  "panel length"
showr sd  "head length"
showr sf  "tail length"
showr sw  "tail width"
showr sh  "tail edge"
float ah,bh
'ah=s/sh
'show ah
'ah=deg(acos(ah))
'show ah
bh=sqr((sh*sh)-(s*s))
showr s "base width"
showr bh "base hip height"
heading "angles"
float da,db,ha,ta,tb
ha=atand(sw,sd)
ta=atand(sf,sw)
tb=atand (bh,s)
show ha "panel angle"
show ta "tail angle"
show tb "hip angle"
da=360-(ha*2*n)
db=360-(180+tb+tb+180-ta-ta)
show da "apex deficient angle"
show db "hip deficient angle"
'
'*/
'
wait

