CompuServe Thread

#Double Click & Area Q's

7 messages in this thread
#115590From: MARK A. MEIERAug 1, 1994 7:42 PM
A few questions to anyone… 1) Has anyone created a function to handle double clicking the mouse in an IPAS3 program? I would like to use this feature but don't know how to implement it. 2) Does anyone know how to calculate the AREA of a triangle in 3 space? For example I would like to create a function to which you pass 3 3d vertices and it returns the area of the triangle formed by those verticies, i.e. float tri_area(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) Thanks to anyone who can help, Mark
#115679From: Ed KellermanAug 2, 1994 5:09 AM
< AREA of a triangle in 3 space? > If a, b and c are the lengths of the sides, then the area is: sqrt(s *(s-a) *(s-b)*(s-c) ) where s = 1/2(a+b+c) Compute a, b, and c using the fact that the distance between two points is sqrt( (x2-x1)squared + (y2-y1) squared + (z2-z1) squared ) Ed K
#115736From: Rolf BerteigAug 2, 1994 11:50 AM
< AREA of a triangle in 3 space? > Here's a way to do it with 1 sqrt(): Construct the vectors A and B as any two edges of the triangle. A = < x2-x1, y2-y1, z2-z1 > B = < x3-x2, y3-y2, z3-z2 > then the area is: 1/2 * |AxB| – Rolf
#116019From: David RhotenAug 3, 1994 11:02 AM
Wow! Rolf, are you gonna be contributing on CIS regularly now? Heck, the power of this forum just keeps growing! (Or are you just goofing off cause Gary's on vacation?<g>) Dave
#116062From: Rolf BerteigAug 3, 1994 1:45 PM
I wish I had time to contribute more regularly. I browse through messages fairly regularly, I just don't have time to post often. If only I didn't need to sleep… – Rolf
#116269From: David RhotenAug 4, 1994 11:37 AM
Well, it's still good to know you're here, lurking in the shadows…. "Say! What's that strange sound coming from the dark corner of the room?" "Oh, that's just Rolf. He's just lurking and catching a few Z's!" <g> Dave
#115775From: MARK A. MEIERAug 2, 1994 2:16 PM
Ed, <<Area>> Thanks alot! I used your algorithm and coded up a routine this morning to compute the surface area of any 3ds object at any frame of an animation. Works great. Mark PS: I enjoyed your article in Planet Studio.