Jump to content
  • Advertisement
Sign in to follow this  

2D Geometry Problem

This topic is 1473 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, take a look at this:




That's the profile of a 3D wall. Basically I have the light grey part and want to make sections that jut out (the dark grey). The problem I'm having is getting a uniform thickness (the blue lines should all be the same length), I know I have to adjust the two gold vertices but I'm not sure how, I think I need to use the Pythagorean theorem but I don't know how to set it up. Also, in this case the angle is 45 degrees but I need a general solution for other angles.


It would be nice if i could just do it in 3ds Max but I can't see how, so I'll do the computations myself.


Thanks for helping.


Share this post

Link to post
Share on other sites

The problem I'm having is getting a uniform thickness

The issue will be, that you have to change the topology of the mesh. The light gray mesh right silhouette consists of 3 lines, a uniform thickness hull will need circles to be uniform. Eg take the corner of the light-gray section between the two lower blue lines and draw a circle around it to see the corner part  of a uniform thickness hull.


With this in mind you can construct a hullmesh by a selection of geometry objects. In 3d you need a box for a plane, a cylinder for a edge and a sphere for a vertex. The combination (union including the original mesh) of all this will define the hull mesh with a uniform thickness.

Edited by Ashaman73

Share this post

Link to post
Share on other sites
The problem I'm having is getting a uniform thickness ...

Of course, Ashaman73 is right, but if "uniform thickness" is not taken literally, ...

... (the blue lines should all be the same length)

... so that differences in thickness are allowed just in corners (like in the illustration), then ray intersections can be used to determine the vertex positions. I.e.make copies of 2 consecutive edges, compute rays from them, displace them orthogonally by the wall thickness, and compute their intersection point to get the "golden vertex".


E.g. with the consecutive vertices v1, v2, v3 the rays would look like

   r12( k ) := v1 + w * perp( v2 - v1 ) + k * ( v2 - v1 )

   r23( k ) := v2 + w * perp( v3 - v2 ) + k * ( v3 - v2 )

where perp(v) means the (wanted) perpendicular normalized vector of v, and w denotes the wall thickness.



   r12( k' ) = r23( k' )

gives a condition for the intersection. The condition denotes a point if the rays are not parallel, and hence solving for k' and setting back in one of the ray equations gives the vertex of interest. 

Edited by haegarr

Share this post

Link to post
Share on other sites

Thanks guys,


I'm using this for actual geometry, not hulls.


The intersection method is working, It gave me the idea to do something similar using the boolean operator in 3ds, it has the same effect.


Thanks again.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!