Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.mud.programming > #22

PointBehindPoly() (of trianlges circular circular representation angle facing a vertex in 3d)

From "Nicholas Randall Forystek" <nforystek@outlook.com>
Newsgroups alt.bumbling.idiots.the.fbi, alt.courts.pretrial-services, alt.mud.programming
Subject PointBehindPoly() (of trianlges circular circular representation angle facing a vertex in 3d)
Date 2016-07-09 22:36 -0500
Message-ID <BdidndRzEs1dXxzKnZ2dnUU7-InNnZ2d@giganews.com> (permalink)

Cross-posted to 3 groups.

Show all headers | View raw


Public Sub Main()

'length of traingle's sides
Dim l1 As Double: l1 = 1.27
Dim l2 As Double: l2 = 1.27
Dim l3 As Double: l3 = 1.27

'3d vertext to origin 0,0,0
Dim v1 As Double: v1 = 1.27
Dim v2 As Double: v2 = 1.27
Dim v3 As Double: v3 = 1.27

'half of root x3
Dim h1 As Double
Dim h2 As Double

'result checking
Dim r1 As Double
Dim r2 As Double

'calculate equal radius widths to 1 & 1/3rd diameter roots
h1 = Sqr((l1 + l2 + l3) * (l1 + l2 + l3) * (l1 + l2 + l3))
h2 = Sqr((l1 * l2 * l3) + (l1 * l2 * l3) + (l1 * l2 * l3))

'display result of area
r1 = Sqr(h1 + h2)

'another way of representing it but we want the long forms
' = Sqr(Sqr((l1 + l2 + l3) ^ 3) + Sqr((l1 * l2 * l3) * 3))

'the long forms give us origin equation approach to vertex
h1 = Sqr((((l1 + l2 + l3) * (l1 + l2 + l3) * (v1 + v2 - v3)) + _
        ((l2 + l3 + l1) * (l2 + l3 + l1) * (v2 + v3 - v1)) + _
        ((l3 + l1 + l2) * (l3 + l1 + l2) * (v3 + v1 - v2))))

'here we are doubling 1/3rd root of a vertex as part of it
h2 = Sqr(((l1 * l2 * l3) + (l1 * l2 * l3) + (l1 * l2 * l3) + _
            (v1 * v2 * v3) + (v1 * v2 * v3) + (v1 * v2 * v3)))

'vertex's radius
r2 = Sqr(h1 + h2)

'display result of area
Debug.Print IIf((r2 <= r1), "The Point is Behind the Poly Triangle.", _
                            "The Point is not Behind the Poly Triangle.")
End Sub 

Back to alt.mud.programming | Previous | Next | Find similar


Thread

PointBehindPoly() (of trianlges circular circular representation angle facing a vertex in 3d)  "Nicholas Randall Forystek" <nforystek@outlook.com> - 2016-07-09 22:36 -0500

csiph-web