Skip to main content
Log in

GRAND3 — Ground structure based topology optimization for arbitrary 3D domains using MATLAB

  • RESEARCH PAPER
  • Published:
Structural and Multidisciplinary Optimization Aims and scope Submit manuscript

Abstract

Since its introduction, the ground structure method has been used in the derivation of closed–form analytical solutions for optimal structures, as well as providing information on the optimal load–paths. Despite its long history, the method has seen little use in three–dimensional problems or in problems with non–orthogonal domains, mainly due to computational implementation difficulties. This work presents a methodology for ground structure based topology optimization in arbitrary three–dimensional (3D) domains. The proposed approach is able to address concave domains and with the possibility of holes. In addition, an easy–to–use implementation of the proposed algorithm for the optimization of least–weight trusses is described in detail. The method is verified against three–dimensional closed–form solutions available in the literature. By means of examples, various features of the 3D ground structure approach are assessed, including the ability of the method to provide solutions with different levels of detail. The source code for a MATLAB implementation of the method, named GRAND3 — GRound structure ANalysis and Design in 3D, is available in the (electronic) Supplementary Material accompanying this publication.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22
Fig. 23
Fig. 24
Fig. 25

Similar content being viewed by others

Notes

  1. A directional cosine vector has a norm of unity by definition, and thus the dot product of directional cosines vectors is equal to the cosine of the angle between them.

  2. This collision primitive is built from multiple calls to the triangle and quad collision primitives.

  3. Michell’s formula matches the subsequent work provided that the quantity L in Michell (1904) is taken to be equal to M r. Whether Michell meant this to be the real meaning of the quantity L, or not, is unclear.

  4. This could be solved by making the domain wider than it is taller (L x =L y >R), but that would imply a priori knowledge of the solution.

  5. Ericson (2004) outlined a procedure for the finite cylinder. However, his derivation is flawed. The book’s errata attempts to fix this, but with no success.

References

  • Achtziger W (2007) On simultaneous optimization of truss geometry and topology. Struct Multidiscip Optim 33(4–5):285–304

    Article  MathSciNet  MATH  Google Scholar 

  • Barber CB, Dobkin DP, Huhdanpaa H (1996) The quickhull algorithm for convex hulls. ACM Trans Math Softw 22(4):469–483. http://www.qhull.org/

    Article  MathSciNet  MATH  Google Scholar 

  • Christensen P, Klarbring A (2009) An introduction to structural optimization, 1st edn. Springer, Berlin

    MATH  Google Scholar 

  • Dorn WS, Gomory RE, Greenberg HJ (1964) Automatic design of optimal structures. J Mech 3(1):25–52

    Google Scholar 

  • Ericson C (2004) Real-time collision detection, 1st edn. Morgan Kaufmann, San Francisco

    Google Scholar 

  • Gerdes D (1994) Strukturoptimierung unter Anwendung der Optimalitätskriterien auf diskretisierte Tragwerke bei besonderer Berücksichtigung der Stabilität (in German). Phd thesis, Universitĺat Essen

  • Gilbert M, Darwich W, Tyas A, Shepherd P (2005) Application of large-scale layout optimization techniques in structural engineering practice. In: 6th world congress of structural and multidisciplinary optimizartion, June:1–10

  • Gilbert M, Tyas A (2003) Layout optimization of large-scale pin-jointed frames. Eng Comput 20(8):1044–1064

    Article  MATH  Google Scholar 

  • Hemp WS (1973) Optimum structures, 1st edn. Oxford University Press, Oxford

    Google Scholar 

  • Hencky H (1923) Über einige statisch bestimmte Fälle des Gleichgewichts in plastischen Körpern. Z Angew Math Mech 747:241–251

    Article  Google Scholar 

  • Herceg M, Kvasnica M, Jones CN, Morari M (2013) Multi-parametric toolbox 3.0. In: Proceedings of the European control conference. http://control.ee.ethz.ch/~mpt, Zürich, pp 502–510

  • Karmarkar N (1984) A new polynomial-time algorithm for linear programming. Combinatorica 4(4):373–395

    Article  MathSciNet  MATH  Google Scholar 

  • Kicher TP (1966) Optimum design-minimum weight versus fully stressed. ASCE Journal of Structural Division 92(ST 6):265–279

    Google Scholar 

  • Kirsch U (1993) Structural optimization: fundamentals and applications, 1st edn. Springer, Berlin

    Book  Google Scholar 

  • Lewiński T (2004) Michell structures formed on surfaces of revolution. Struct Multidiscip Optim 28(1):20–30

    Article  MathSciNet  Google Scholar 

  • Lewiński T, Zhou M, Rozvany GIN (1994) Extended exact solutions for least-weight truss layouts–Part I: cantilever with a horizontal axis of symmetry. Int J Mech Sci 36(5):375–398

    Article  MATH  Google Scholar 

  • Mazurek A, Baker WF, Tort C (2011) Geometrical aspects of optimum truss like structures. Struct Multidiscip Optim 43(2):231– 242

    Article  Google Scholar 

  • Michell AGM (1904) The limits of economy of material in frame-structures. Philosophical Magazine Series 6 8(47):589–597

    Article  MATH  Google Scholar 

  • Ohsaki M (2010) Optimization of finite dimensional structures, 1st edn. CRC Press, Boca Raton

    Book  Google Scholar 

  • Rozvany GIN (1997) On the validity of Prager’s example of nonunique Michell structures. Structural Optimization 13(2–3):191– 194

    Article  Google Scholar 

  • Rycroft CH (2014) Voro++ v0.4.6: a three-dimensional Voronoi cell library in C++. http://math.lbl.gov/voro++/. Accessed 21 April 2014

  • Smith ODS (1998) Generation of ground structures for 2D and 3D design domains. Eng Comput 15(4):462–500

    Article  MATH  Google Scholar 

  • Sokół T (2011) A 99 line code for discretized Michell truss optimization written in mathematica. Struct Multidiscip Optim 43(2):181–190

    Article  MATH  Google Scholar 

  • Stromberg LL, Beghini A, Baker WF, Paulino GH (2010) Application of layout and topology optimization using pattern gradation for the conceptual design of buildings. Struct Multidiscip Optim 43(2):165–180

    Article  Google Scholar 

  • Sved G (1954) The minimum weight of certain redundant structures. Austral J Appl Sci 5:1–9

    Google Scholar 

  • Tyas A, Gilbert M, Pritchard T (2006) Practical plastic layout optimization of trusses incorporating stability considerations. Comput Struct 84(3–4):115–126

    Article  Google Scholar 

  • Wright MH (2004) The interior-point revolution in optimization: history, recent developments, and lasting consequences. Bull Am Math Soc 42(1):39–56

    Article  Google Scholar 

  • Zegard T, Paulino GH (2014) GRAND – Ground structure based topology optimization on arbitrary 2D domains using MATLAB. Struct Multidiscip Optim 50(5):861–882

    Article  MathSciNet  Google Scholar 

Download references

Acknowledgments

The authors appreciate constructive comments and insightful suggestions from the anonymous reviewers. We are thankful to the support from the US National Science Foundation under grant CMMI #1335160. We also acknowledge the support from SOM (Skidmore, Owings and Merrill LLP) and from the Donald B. and Elizabeth M. Willett endowment at the University of Illinois at Urbana–Champaign. Any opinion, finding, conclusions or recommendations expressed here are those of the authors and do not necessarily reflect the views of the sponsors.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Glaucio H. Paulino.

Electronic supplementary material

Below is the link to the electronic supplementary material.

(ZIP 128 KB)

Appendices

Appendix A: – Nomenclature

A :

Connectivity matrix

a :

Cross–sectional areas vector

B T :

Force equilibrium (geometric) matrix

C o l T o l :

Tolerance in the collinearity check

\(\hat {\mathbf {d}}\) :

Member’s directional cosines vector

f :

Nodal load vector

G :

Candidate member matrix

l :

Member’s length vector

L v l :

Ground structure connectivity level

n :

Internal (axial) forces vector

N b :

Number of bars (truss members)

N d o f :

Number of degrees–of–freedom of the structure

N e :

Number of elements in the base mesh

N f :

Number of nodes with fixities

N l :

Number of nodes with loads

N n :

Number of nodes in the domain

N s u p :

Number of fixed nodal components (or DOFs)

s +,s :

Stress constraint (positive) slack variables

V :

Volume

κ :

Tension to compression stress limit ratio

σ :

Member’s (axial) stresses vector

σ T ,σ C :

Stress limits in tension and compression

ϕ F :

Latitude of the the moment application ring for the torsion ball problem

Appendix B: – Collision (intersection) tests

The collision (or intersection) tests are quite common in the the video–game industry and in the field of computational geometry. While not constituting a new development, these derivations are given here for the sake of completeness. The collision primitives for the box, triangle, quadrangle and cylinder follow procedures outlined in Ericson (2004) with some modifications. The sphere, disc and rodFootnote 5 were developed specifically for GRAND3, although similar procedures are likely to be found in literature given the relatively simple nature of the problem.

The surface primitive, built from the triangle and quadrangle primitives, is special; a complicated restriction volume can be translated into testing the collision on its surface. This allows the method to address complicated volumes that would be difficult to represent with the already available primitives.

1.1 B.1 Box primitive

The box primitive is defined by the coordinates of the two extreme vertices; \(A_{min}=\left \{ x_{min} ~,~ y_{min} ~,~ z_{min} \right \}\) and \(A_{max}=\left \{ x_{max} ~,~ y_{max} ~,~ z_{max} \right \}\). Given a segment \(\overline {pq}\), the segment’s directional vector is \(\mathbf {d}=\overrightarrow {PQ}=Q-P\), and any point X in the segment is defined as X=P+t d, with 0≤t≤1. The segment collides with the box if there is a sub–segment within \(\overline {pq}\) contained inside the box, as shown in Fig. 26.

Fig. 26
figure 26

Collision test between a box and a segment

Defining the sub–segment \(\overline {P^{\prime }Q^{\prime }}\), with \(P^{\prime }=P+t_{min}\mathbf {d}\) and \(Q^{\prime }=P+t_{max}\mathbf {d}\), the sub–segment is valid if 0≤t m i n t m a x ≤1. Initially t m i n =0 and t m a x =1, positioning nodes P and Q at P and Q respectively. The sub–segment is then clipped by the box’s 6 planes, corresponding to x m i n , x m a x , y m i n , y m a x , z m i n and z m a x . If the sub–segment is still valid after the clipping has been done, then the sub–segment is inside the box.

Defining a unit vector in the x direction \(\hat {\mathbf {e}}_1 = \left \{ 1 ~,~ 0 ~,~ 0 \right \}\), the procedure for clipping on the x plane is as follows:

$$ t_1 = \frac{ A_{min} \cdot \hat{\mathbf{e}}_1 - P \cdot \hat{\mathbf{e}}_1 }{ \mathbf{d} \cdot \hat{\mathbf{e}}_1} \qquad t_2 = \frac{ A_{max} \cdot \hat{\mathbf{e}}_1 - P \cdot \hat{\mathbf{e}}_1 }{ \mathbf{d} \cdot \hat{\mathbf{e}}_1} $$
(15)

Depending on the orientation of \(\overline {pq}\), it could occur that t 1>t 2, and in such case their values are switched; \(t_1 \leftarrow t_2\) and \(t_2 \leftarrow t_1\). Finally, the clipping process is simply:

$$ t_{min} \leftarrow \max \left( t_{min} ~,~ t_1 \right) \qquad t_{max} \leftarrow \min \left( t_{max} ~,~ t_2 \right) $$
(16)

The process is then repeated for the y plane with \(\hat {\mathbf {e}}_2 = \left \{ 0 ~,~ 1 ~,~ 0 \right \}\), and finally the z plane with \(\hat {\mathbf {e}}_3 = \left \{ 0~,~ 0 ~,~ 1 \right \}\). The segment collides with the box if t m i n t m a x after all the clipping has been carried out. Incidentally, this procedure can address the accidental case where A m i n and A m a x are reversed.

1.2 B.2 Triangle primitive

Given a segment \(\overline {pq}\), intersecting the plane defined by points A, B and C in space at a point W (Fig. 27). The segment intersects the triangle △A B C if point W lies inside the triangle.

Fig. 27
figure 27

Collision test between a triangle and a segment

One possible solution is to find the point W, and then check if such point is inside the triangle. Assuming the triangle is defined counterclockwise: point W is inside the triangle if it is located to the left for all edges. Extending to any triangle arrangement (clockwise or counterclockwise): point W is inside the triangle if it is located to the same side for all edges. Based on this idea, the volumes of the three distinct tetrahedra can be defined by segment \(\overline {pq}\), and each one of the triangle’s edges. These volumes can be computed by triple products, with the sign of these triple products depending on the manifold orientation of the three vectors defining the tetrahedron. If point W is found to the same side of all edges, then the sign of these volume calculations (triple products) is the same.

Defining the segment’s directional vector as \(\mathbf {d}=\overrightarrow {PQ}=Q-P\), then any point X within the segment is defined as X=P+t d, with 0≤t≤1. The normal to the triangle’s plane is \(\mathbf {n}=\overrightarrow {AB}\times \overrightarrow {AC}\). The intersection point with the plane of the triangle W is defined as W=P+t w d, with:

$$ t_w = \frac{\overrightarrow{PA} \cdot \mathbf{n}}{\mathbf{d} \cdot \mathbf{n}} \:. $$
(17)

The triple products are defined as:

$$\begin{array}{@{}rcl@{}} V_1 &=& \left[ \mathbf{d}~ \overrightarrow{PC} ~ \overrightarrow{PB} \right] \\ V_2 &= &\left[ \mathbf{d} ~ \overrightarrow{PA} ~ \overrightarrow{PC} \right]\\ V_3 &=& \left[ \mathbf{d} \; \overrightarrow{PB} \; \overrightarrow{PA} \right] \end{array} $$
(18)

Finally, the segment \(\overline {pq}\) intersects the triangle △A B C if and only if:

$$ 0\leq t_w \leq 1 \qquad \text{and} \qquad \text{sign} \left( V_1 \right) = \text{sign} \left( V_2 \right) = \text{sign} \left( V_3 \right) $$
(19)

1.3 B.3 Quadrangle primitive

Splitting the quadrangle into two triangles, the quadrangle is really an extension of the triangle primitive case. It is assumed that the quadrangle is flat and all 4 points lie (approximately) in the same plane. Compared to two complete triangle tests, there is a potential computational saving if one of the two triangles is chosen early in the calculations (triangles △A B 1 C and △A C B 2 in Fig. 28).

Fig. 28
figure 28

Collision test between a quadrangle and a segment

Defining the segment’s directional vector as \(\mathbf {d}=\overrightarrow {PQ}=Q-P\), then any point X within the segment is defined as X=P+t d, with 0≤t≤1. The normal to the quadrangle’s plane is \(\mathbf {n}=\overrightarrow {AB_1}\times \overrightarrow {AB_2}\). The intersection point with the plane of the quadrangle is defined as W=P+t w d, with:

$$ t_w = \frac{\overrightarrow{PA} \cdot \mathbf{n}}{\mathbf{d} \cdot \mathbf{n}} ~. $$
(20)

The triple products are defined as:

$$\begin{array}{@{}rcl@{}} V_a = & \left[ \mathbf{d} ~ \overrightarrow{PC} ~ \overrightarrow{PB_1} \right] &= \mathbf{e}_1 \cdot \overrightarrow{PB_1}\\ V_b = & \left[ \mathbf{d} ~ \overrightarrow{PC} ~ \overrightarrow{PB_2} \right] & = \mathbf{e}_1 \cdot \overrightarrow{PB_2}\\ V_2 = & - \left[ \mathbf{d} ~ \overrightarrow{PC} ~ \overrightarrow{PA} \right] & = - \mathbf{e}_1 \cdot \overrightarrow{PA} ~, \end{array} $$
(21)

with \(\mathbf {e}_1 = \mathbf {d} \times \overrightarrow {PC}\). If the segment collides with a triangle, then all triple products must have the same sign. Thus, the correct triangle can be chosen at this stage, and the third (and last) triple product can be computed:

$$\begin{array}{@{}rcl@{}} \mathbf{e}_2 &=& ~ \left\{ \begin{array}{lll} \mathbf{d} \times \overrightarrow{PB_1} & ~ \text{ if } ~ & \text{sign} \left( V_a \right) = \text{sign} \left( V_2 \right) \\ \mathbf{d} \times \overrightarrow{PB_2} & ~ \text{ if } ~ & \text{sign} \left( V_b \right) = \text{sign} \left( V_2 \right) \end{array}\right.\\ V_3 &=& \mathbf{e}_2 \cdot \overrightarrow{PA} \end{array} $$
(22)

The segment collides with the quadrangle \(\Box AB_1CB_2\) if and only if:

$$ 0\leq t_w \leq 1 \qquad \text{and} \qquad \text{sign} \left( V_2 \right) = \text{sign} \left( V_3 \right) $$
(23)

1.4 B.4 Sphere primitive

Defining the segment’s directional vector as \(\mathbf {d}=\overrightarrow {PQ}=Q-P\), then any point X in the segment is defined as X=P+t d, with 0≤t≤1. The segment intersects the sphere if any of the following three criteria is met (Fig. 29):

  1. 1.

    Point P is inside the sphere.

  2. 2.

    Point Q is inside the sphere.

  3. 3.

    The point in the segment that is closest to the sphere’s center is between P and Q and inside the sphere.

Fig. 29
figure 29

Collision test between a sphere and a segment

Defining a vector v=CP, then there is collision according to the first criteria if:

$$ \mathbf{v} \cdot \mathbf{v} \leq r^2 $$
(24)

Similarly, there is collision according to the second criteria if:

$$ \left( \mathbf{v}-\mathbf{d} \right) \cdot \left( \mathbf{v}-\mathbf{d} \right) = \mathbf{v} \cdot \mathbf{v} - 2 \mathbf{v} \cdot \mathbf{d} + \mathbf{d} \cdot \mathbf{d} \leq r^2 $$
(25)

The closest point in the line defined by P and Q to the sphere’s center, measured from point P is:

$$ \mathbf{w} = \frac{\mathbf{v} \cdot \mathbf{d}}{\mathbf{d} \cdot \mathbf{d}} \mathbf{d} $$
(26)

This point is inside the sphere if:

$$\begin{array}{@{}rcl@{}} \left( \mathbf{v}-\mathbf{w} \right) \cdot \left( \mathbf{v}-\mathbf{w} \right) & \leq & r^2 \\ \left( \mathbf{v}- \frac{\mathbf{v} \cdot \mathbf{d}}{\mathbf{d} \cdot \mathbf{d}} \mathbf{d} \right) \cdot \left( \mathbf{v} - \frac{\mathbf{v} \cdot \mathbf{d}}{\mathbf{d} \cdot \mathbf{d}} \mathbf{d} \right) & \leq & r^2~, \end{array} $$
(27)

with this point inside the segment \(\overline {pq}\) if and only if 0≤wddd, which is an equivalent expression to 0≤t≤1.

1.5 B.5 Disc primitive

Defining the segment’s directional vector as \(\mathbf {d}=\overrightarrow {PQ}=Q-P\), then any point X in the segment is defined as X=P+t d, with 0≤t≤1.

The disc is centered at point A, and the normal points towards a point B as in Fig. 30. The normal to the plane of the disc is n=BA. Defining \(\mathbf {v}=\overrightarrow {AP}=P-A\), the intersection with the disc’s plane is found at a point W=P+t w d:

$$ t_w = - \frac{\mathbf{v} \cdot \mathbf{n}}{\mathbf{d} \cdot \mathbf{n}} $$
(28)

The segment collides with the disc if the distance between point W and the disc’s center A is less than or equal to the disc’s radius:

$$ \overrightarrow{AW} = W-A = P-A+t_w \mathbf{d} = \mathbf{v} - \frac{\mathbf{v} \cdot \mathbf{n}}{\mathbf{d} \cdot\mathbf{n}} \mathbf{d} $$
(29)

Finally, the segment collides with the disc if and only if:

$$ \overrightarrow{AW} \cdot \overrightarrow{AW} = \left( \mathbf{v} - \frac{\mathbf{v} \cdot \mathbf{n}}{\mathbf{d} \cdot \mathbf{n}} \right) \cdot \left( \mathbf{v} - \frac{\mathbf{v} \cdot \mathbf{n}}{\mathbf{d} \cdot \mathbf{n}} \right) \leq r^2 ~, $$
(30)

with 0≤t w ≤1.

Fig. 30
figure 30

Collision test between a disc and a segment

1.6 B.6 Cylinder primitive (infinite cylinder)

Defining the segment’s directional vector as \(\mathbf {d}=\overrightarrow {PQ}=Q-P\), then any point X in the segment is defined as X=P+t d, with 0≤t≤1. The segment is found to collide with the (infinite) cylinder if:

  1. 1.

    The segment collides with the cylinder’s surface.

  2. 2.

    The segment is completely contained within the cylinder.

The cylinder’s axis is defined by n=BA as in Fig. 31. The intersection with the cylinder’s surface is found at points W=P+t w d. Defining the radial vector of length r from the cylinder’s axis to point W as m, then:

$$\begin{array}{@{}rcl@{}} 0 &=& \mathbf{m} \cdot \mathbf{m} - r^2 \\ 0 &=& \left( \overrightarrow{AW} - \frac{\overrightarrow{AW} \cdot \mathbf{n}}{\mathbf{n} \cdot \mathbf{n} } \mathbf{n} \right) \cdot \left( \overrightarrow{AW} - \frac{\overrightarrow{AW} \cdot \mathbf{n}}{\mathbf{n} \cdot\mathbf{n} } \mathbf{n} \right) - r^2 \end{array} $$
(31)

Defining \(\mathbf {v}=\overrightarrow {AP}=P-A\), and expanding \(\overrightarrow {AW}\) in terms of v, d and t w :

$$\begin{array}{@{}rcl@{}} 0 &=& \left( \left( \mathbf{v} + t_w \mathbf{d} \right) - \left[ \frac{ \left( \mathbf{v} + t_w \mathbf{d} \right) \cdot \mathbf{n}}{\mathbf{n} \cdot \mathbf{n} } \right] \mathbf{n} \right) \cdot \\ && \left( \left( \mathbf{v} + t_w \mathbf{d} \right) - \left[ \frac{ \left( \mathbf{v} + t_w \mathbf{d} \right) \cdot \mathbf{n}}{\mathbf{n} \cdot \mathbf{n} } \right] \mathbf{n} \right) - r^2 ~, \end{array} $$
(32)

where terms can be ordered to obtain a quadratic equation for t w :

$$\begin{array}{@{}rcl@{}} 0 &=& \left[ \mathbf{d} \cdot \mathbf{d} - \frac{\left( \mathbf{d} \cdot \mathbf{n}\right)^2}{\mathbf{n} \cdot \mathbf{n}} \right] t_w^2 \;+ \\ && 2 \left[ \mathbf{v} \cdot \mathbf{d} - \frac{ \left( \mathbf{d} \cdot \mathbf{n}\right)\left( \mathbf{v} \cdot \mathbf{n}\right)}{\mathbf{n} \cdot \mathbf{n}} \right] t_w \;+ \\ && \left( \mathbf{v} \cdot \mathbf{v} \right) - \frac{\left( \mathbf{v} \cdot \mathbf{n}\right)^2}{\mathbf{n} \cdot \mathbf{n}} - r^2 \end{array} $$
(33)

Multiplying by nn, the quadratic equation becomes:

$$\begin{array}{@{}rcl@{}} 0 &=& a t_w^2 + b t_w + c \\ a &=& \left( \mathbf{n} \cdot \mathbf{n} \right) \left( \mathbf{d} \cdot \mathbf{d} \right) - \left( \mathbf{d} \cdot \mathbf{n}\right)^2\\ \frac{b}{2} &=& \left( \mathbf{n} \cdot \mathbf{n} \right) \left( \mathbf{v} \cdot \mathbf{d} \right) - \left( \mathbf{d} \cdot \mathbf{n} \right) \left( \mathbf{v} \cdot \mathbf{n} \right) \\ c &=& \left( \mathbf{n} \cdot \mathbf{n} \right) \left[ \left( \mathbf{v} \cdot \mathbf{v} \right) - r^2 \right] -\left( \mathbf{v} \cdot \mathbf{n}\right)^2, \end{array} $$
(34)

with solutions given by:

$$ t_w = \frac{-b \pm \sqrt{b^2-4ac}}{2a} = \frac{-\frac{b}{2} \pm \sqrt{\left( \frac{b}{2}\right)^2-ac}}{a} $$
(35)

The (infinite) line defined by the segment does not intersect the cylinder if the discriminant in (35) is negative (i.e. \(\left (b/2\right )^2-ac < 0\)). If the discriminant is positive, then an additional check must be made to ensure the intersection point is within the segment \(\overline {pq}\). The segment collides with the cylinder if 0≤t w ≤1 for any of the two roots (points W and W in Fig. 31).

Fig. 31
figure 31

Collision test between a cylinder (infinite length) and a segment

Finally, the segment is completely contained inside the cylinder, if the distance from the cylinder’s axis to point P is less than or equal to the radius r:

$$ \left( \mathbf{v} - \frac{\mathbf{v} \cdot \mathbf{n}}{\mathbf{n} \cdot \mathbf{n} } \mathbf{n} \right) \cdot \left( \mathbf{v} - \frac{\mathbf{v} \cdot \mathbf{n}}{\mathbf{n} \cdot \mathbf{n} } \mathbf{n} \right) \leq r^2 $$
(36)

1.7 B.7 Rod primitive

The rod primitive is a combination of the infinite cylinder and disc primitives with some minor modifications. The segment collides with the rod if any of the following 4 situations occur:

  • The segment collides with the finite cylinder’s surface.

  • The segment collides with the A endcap (disc).

  • The segment collides with the B endcap (disc).

  • The segment is fully contained within the rod.

The collision with the finite cylinder’s surface begins from the test primitive for the infinite cylinder outlined in (34) and (35). In addition, the intersection points W and \(W^{\prime }\) (Fig. 32) must be in the surface between the endcaps. Thus, an additional check is required; the segment collides with the finite cylinder’s surface if:

$$\begin{array}{@{}rcl@{}} 0 &\leq & \mathbf{w} \cdot \mathbf{n} \leq \mathbf{n} \cdot \mathbf{n} \\ 0 &\leq & \left( \mathbf{v} + t_w \mathbf{d} \right) \cdot \mathbf{n} \leq \mathbf{n} \cdot \mathbf{n} \end{array} $$
(37)

for any of the two roots of t w from (35), with 0≤t w ≤1.

Fig. 32
figure 32

Collision test between a rod (finite cylinder with endcaps) and a segment

The collision with the endcaps A and B follow the procedure for the disc primitive. Equation (30) can be used with no modification to test the collision against endcap A. The B endcap is analogous to the endcap A; the segment collides with endcap B if:

$$\begin{array}{@{}rcl@{}} \overrightarrow{BW} \cdot \overrightarrow{BW} &\leq & r^2 \\ \left( \mathbf{v} + \frac{\mathbf{n} \cdot \mathbf{n} - \mathbf{v} \cdot \mathbf{n}}{\mathbf{d} \cdot \mathbf{n}}\right) \cdot \left( \mathbf{v} + \frac{\mathbf{n} \cdot \mathbf{n} - \mathbf{v} \cdot \mathbf{n}}{\mathbf{d}\cdot \mathbf{n}} \right) &\leq& r^2 ~, \end{array} $$
(38)

with:

$$ 0\leq \left( t_w = \frac{\mathbf{n} \cdot \mathbf{n} - \mathbf{v} \cdot \mathbf{n}}{\mathbf{d} \cdot \mathbf{n}} \right) \leq 1 $$
(39)

Finally, if the segment is completely contained in the rod, then point P must be inside the rod. In other words, if the distance from point P to the cylinder’s axis is less than or equal to r:

$$ \left( \mathbf{v} - \frac{\mathbf{v} \cdot \mathbf{n}}{\mathbf{n} \cdot \mathbf{n} } \mathbf{n} \right) \cdot \left( \mathbf{v} - \frac{\mathbf{v} \cdot \mathbf{n}}{\mathbf{n} \cdot \mathbf{n} } \mathbf{n} \right) \leq r^2 ~, $$
(40)

with an additional check to verify point A is between the endcaps:

$$ 0 \leq \frac{\mathbf{v} \cdot \mathbf{n}}{\mathbf{n} \cdot \mathbf{n} } \leq 1 $$
(41)

1.8 B.8 Surface primitive

The surface primitive builds from the base of the triangle and quadrangle primitives. The surface primitive can handle any surface provided that it is tessellated (discretized) and the points in each facet lie (approximately) in the same plane. In addition, it is assumed that all facets are convex in their own plane. An example of a tessellated surface is shown in Fig. 33: the surface was tessellated using triangles and quadrangles. The inputs for this collision primitive are:

  • A matrix of nodes RNODE of size N r n ×3, where N r n is the number of nodes in the collision surface.

  • A list (cell) with facet connectivity RFACE of size N r f ×1, where N r f is the number of facets in the collision surface. Each entry in RFACE is a row vector with nodal connectivity (based on RNODE).

Fig. 33
figure 33

Collision surface example: Surface is tessellated into triangles and quadrangles

The surface collision primitive can address facets with more than 4 nodes (flat polygons), provided that all the nodes lie in (approximately) the same plane. This polygon will be subdivided into triangles and evaluated sequentially.

1.9 B.9 Development & debugging of collision tests

Algorithms for additional intersection tests can be found in literature or derived. It is strongly recommended however, to test and debug new collision primitives thoroughly. In the present work for example, simple game–like user interfaces were used for live testing the collision primitives (see Fig. 34 for an example).

Fig. 34
figure 34

User interface for live testing and debugging the disc collision primitive

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Zegard, T., Paulino, G.H. GRAND3 — Ground structure based topology optimization for arbitrary 3D domains using MATLAB. Struct Multidisc Optim 52, 1161–1184 (2015). https://doi.org/10.1007/s00158-015-1284-2

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00158-015-1284-2

Keywords

Navigation