Meshing Question What shape are the Hangars on Olympus

dumbo2007

Crazy about real time sims
Joined
Nov 29, 2009
Messages
675
Reaction score
0
Points
0
Location
India
So I am trying to approximate the shape of the hangars at Olympus base. They look like a squashed cylinder located at y = 0 and varying x or z.



These are the lines for the hangar in Olympus.cfg , line 43 to 46 :

Code:
HANGAR3
	POS 40 0 -120
	SCALE 40 10 60
END

So the scale is non uniform on the 3 axes. I am trying to create the collision mesh of this hangar in Bullet. Unfortunately the cylinder radius cannot be different. I have taken a cylinder around the Z axis and the z scaling was easy : length of cylinder = z scaling = 60 m

But I cannot have a Y and a X scaling of 40 and 10. I was thinking perhaps I can take a cylinder with a bigger radius and sink it into the ground a bit so that the chord length of the cylinder that touches the xz plane is 40 and the height is 10.....if you get what I mean. I am not sure about whether the curvature of the surface will match though.

I forgot high school maths the day I left high school so I am unable to come up with the distance to sink the cylinder :(

And yeah the co-ordinate systems are mirror images in the picture though that's irrelevant here
 
Last edited:

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
From looking at it in the simulation with using different scale modifiers, the HANGAR3's roof seems to be a parabolic cylinder passing through (-ScaleX/2, 0, z), (0, ScaleY, z), (ScaleX/2, 0, z) in object local coordinates.

If that's the case, then a generic equation for parabola is (since the [math] tags don't want to work correctly, all will be like it was in C):
Code:
y = a * sqr (x) + b * x + c;

The parameters would be:
Code:
a = -ScaleY / sqr (0.5 * ScaleX);
b = 0;
c = ScaleY;

And the equation including ScaleX and ScaleY as parameters:
Code:
y = -ScaleY * sqr (x) / sqr (0.5 * ScaleX) + ScaleY;

The roof of course isn't exactly that curve but is segmented (it has 6 segments), but I haven't checked what points exactly it's using for vertices of them (except for the obvious, at y=0 and y=ScaleY), but I'm almost sure those points are defined by width and height of the door frame, which is somehow related to width and height of the hangar.
 

dumbo2007

Crazy about real time sims
Joined
Nov 29, 2009
Messages
675
Reaction score
0
Points
0
Location
India
OK, I ll need to think about how to use this info. Meanwhile I went with sunken cylinder - thats 60 meters long and 40 m in radius but located at y=-30. Gives a rough approximation.
 
Top