triangle solving system expression

New releases and general discussions.

Post » Sun Jan 18, 2009 6:55 pm

i think it would be useful to have a system expression for solving triangles, just like we have them for lerp, qarp and cubic



something for all sides, and something for all angles, would be best (the others arent really all that used)

youd have something like SSStri(a,b,c,X) and AAAtri(A,B,C,x)

x being A,B or C depending on what angle you want, or what side you want

the formula for SSS is

and then you find the ACOS of that decimal number.

you switch around ABC depending on what you need
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sun Jan 18, 2009 7:20 pm

In the number 4 case the calculated values would have to be relative. You could scale the entire triangle bigger and smaller and keep the same angles. So in that case you're not truly solving the triangle.
B
3
S
2
G
4
Posts: 271
Reputation: 2,017

Post » Sun Jan 18, 2009 8:14 pm

it would just return a value that you scale the triangle to

something like X*60^2 or wtv.

but SSS is all that id really need, might as well implement other things while theyre at it :P
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sun Jan 18, 2009 8:58 pm

Hmm, we have the sin and cos functions, I think it's not too hard knowing the formulae to come up with the correct calculation.

Expressions like AAAtri look obscure and probably would make a lot of people just go "wtf". I think cubic interpolation is about the most complex math that should be built in, otherwise there's no knowing where to stop (plus interpolation is used loads in games). We could go on with integrals, differentiation, statistical analysis etc. but I think that ought to go in a plugin rather than the runtime.
Scirra Founder
B
358
S
214
G
72
Posts: 22,946
Reputation: 178,333

Post » Sun Jan 18, 2009 9:09 pm

yes you could use sin and cos, but for IK a simple SSS would open up IK for everyone to use easily. you said you didnt want to implement a new behaviour? so just implement SSS and it should make things very easy. im not doing this for myself, its just to help others who therwise wouldnt understand what to do.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sun Jan 18, 2009 9:35 pm

i would happily create a math plugin, if only mingw was supported by the sdk...
B
2
S
2
G
3
Posts: 193
Reputation: 1,636

Post » Mon Jan 19, 2009 4:50 am

I still think an IK Chain plugin should be made. :?
B
2
S
2
G
4
Posts: 136
Reputation: 1,722

Post » Mon Jan 19, 2009 9:19 pm

[quote="Barri167":1457k909]I still think an IK Chain plugin should be made. :?[/quote:1457k909]

but ash said he wont be implementing anything big till 1.0, so that he can clear the bug tracker.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests