Notifications
Clear all

[Closed] ..Math issues

ok I have no idea what to call it so excuse the title.

basically i have three pont3 values that create a tri and I would like to find the fourth point making it a quad.

p.s. you don’t have to do it for me just give me a hint or rather what it is called that I am trying to do hehehe

Thanks for any help
-Baker

7 Replies
1 Reply
(@bobo)
Joined: 11 months ago

Posts: 0

3 points always define a plane. A plane is a 2D set of an infinite number of points. You have to just pick one of them The question is, what is the OTHER rule that defines which point from the plane will be the 4th? Do you want to create a parallelogram? Or something else?

not sure what you mean I am not so good at math as it has been a while but basically I want a planar face example of the point3 values :
point 1 point 2 point 3
[-282, -112, 64][-282, 260, 64][282, 260 ,64]

what i would assume the 4th point would be:
[282,-112,64]

i just don’t know how to get that for each face no matter which the normal points

-Baker

1 Reply
(@bobo)
Joined: 11 months ago

Posts: 0

In your example, all points appear to share the same Z. What if they did not?
You need a solution which should work for ANY 3 points, not just a specia case, right?

right is there a formula that compares the values?

Take a side of the triangle and translate parallel to start from the 3rd point that is not used by that side:

p1 = $Point01.pos
p2 = $Point02.pos
p3 = $Point03.pos
v1 = p3-p1
p4 = p2 - v1
thePoint = Point pos: p4 

There are a couple of other possible solutions for the same triangle, depending on which side you want to use to create the 4th point:

p1 = $Point01.pos
 p2 = $Point02.pos
 p3 = $Point03.pos
 v1 = p2-p1
 p4 = p3 - v1
 thePoint = Point pos: p4 

and


 p1 = $Point01.pos
 p2 = $Point02.pos
 p3 = $Point03.pos
 v1 = p3-p1
 p4 = p2 + v1
 thePoint = Point pos: p4 

This is because the triangle has 3 sides, and each side could be translated parallel to the other side to create the 4th point.

Thanks for all the help bobo you always do more than your fair share in the community.
however being the newb that i am I tried a brute force method which neither 100% accurate for all cases but does what i need it to do which looks like this:

a = #([-282, -112, 64],[-282, 260, 64],[282, 260, 64])
v4 = [0,0,0]
if a[1].x == a[2].x then
(
	v4.x = a[3].x
)
else 
(
	v4.x = a[1].x
)
if a[1].y == a[2].y then
(
	v4.y = a[3].y
)
else 
(
	v4.y = a[1].y
)
if a[1].z == a[2].z then
(
	v4.z = a[3].z
)
else 
(
	v4.z = a[1].z
)
print v4

did not take the time to compare what you just showed me about to do that now but it accomplishes the task i wanted I just need to make a better more efficient way.

Thanks again for your help!!
-Baker

ok yours makes alot more sense then garbage I came up with so again thank you and I belive thats exactly what I want to do.

Thanks again
-Baker