Monday, July 29, 2013

Tangent Spheres Tutorial

This tutorial will show how to create two tangent spheres between two input points using Rhino 5 and Grasshopper 0.9.
This is how the result looks:

















INPUT
The input here is two points in the 3D coordinate system.  Let us call them points A and B.











PARAMETERS
This is a diagram of the parameters that we will need in order to solve the problem:
















1- A tangent point D between the two spheres, at some "t" parameter (0-1) between points A and B.
2- The center of the first sphere, or the mid point C1 between A and D.
3- The center of the second sphere, or the mid point C2 between D and B.
4- the radius of the first sphere (r1), or the distance between A and C1.
5- The radius of the second sphere (r2), or the distance between D and C2.

SOLUTION
We need to define or generate all the parameters identified in the above.
1- We will use the "Expression" component to define point D between A and B at some parameter t. The expression we will use is based on the vector equation of a line: D = A + t*(B-A).
  • B-A: is the vector that goes from B to A using vector subtraction operation.
  • t*(B-A): where "t" value is between 0 and 1 to get us a location on the vector.
  • A+t*(B-A): gets a point on the vector between A and B.














2- We will use the "Expression" component to also define the mid points C1 and C2.
.











3- The first sphere radius (r1) and the second sphere (r2) can be calculated using the "Distance" component.
















4- The final step involves creating the sphere from a base plane and radius. We need to make sure the origins are hooked to C1 and C2 and the radius from r1 and r2.

Exploded Box Tutorial

The following tutorial will show how to explode a polysurface using Rhino 5 and Grasshopper 0.9.
This is how the final exploded box looks like:













INPUT
First we need to identify the input, which is a box in this case.
We will use the "Box" parameter in GH:

PARAMETERS
Next, we need to think of all the parameters we need to know in order to solve this tutorial.
1- The center of explosion,
2- The box faces we are exploding,
3- The direction in which each face is moving.
Once we have identified the parameters, it is a matter of putting it together in a solution.

SOLUTION
Let us put together the solution. Basically piece together the logical steps to reach an answer:
1- The center of the box can be found using the "Box Properties" component in GH:

2- Box faces can be extracted from "Deconstruct Brep" component:

3- The direction in which we move the faces is the tricky part.  We need to first find the center of each face, then define the direction from the center of the box towards the center of each face as in the follows:

4- Once we have all the parameters scripted, we can use the "Move" component to move the faces in the appropriate direction.  Just make sure to set the vectors to the desired amplitude, and you will be good to go.
Here is how the final solution looks:

Welcome to NSAD AGG

Welcome to the architectural geometry and computational design group at Newschool of Architecture + Design in San Diego, California. The blog is meant to share knowledge and showcase our students' designs and experiments with the digital medium of design. In the process, we hope to introduce the foundation knowledge in the field and also explore available technologies and processes used in digital design and fabrication in architectural education and the practice of architecture today.