Week 7

Arch 2042 2012 Spring

Course Arch 2042
Date 2012/04/13
Learning Objectives We continue our treatment of surfaces, showing how other coordinate geometries can often simplify a parametric description to one that includes a rectangular domain. We will also show a number of examples of surfaces including graphs, planes and other non-graph surfaces. The in-class exercise will involve modeling and panelizing surfaces, which will illustrate how different ways of modeling determines different parametrizations and therefore different panelizations given by the isocurves.
Agenda
  • Other Coordinate Geometries
  • Surfaces
    • Parametrizing with other coordinate geometries
    • Examples
    • In-class Assignment: Panelizing Surfaces
  • Assignment
Uses Tool(s)


Surfaces

This is the material that we covered in class on parametrizing surfaces .

As you work through the examples, it will be useful for you to visualize some of the examples (as well as your own creations) using this piece of code DrawParametricSurface.py which currently only takes a rectangular domain.

import rhinoscriptsyntax as rs
import math
 
def DrawParametricSurface(parametric_equation):
    "Draw points on a surface based on a parametric equation."
    # Currently only for a rectangular domain - get the minimum and maximum parameters for this domain
    u0 = rs.GetReal("Minimum u value", 0.0)
    if( u0==None ): return
 
    u1 = rs.GetReal("Maximum u value", 1.0)
    if( u1==None ): return
 
    v0 = rs.GetReal("Minimum v value", 0.0)
    if( v0==None ): return
 
    # Get the maximum parameter
    v1 = rs.GetReal("Maximum v value", 1.0)
    if( v1==None ): return
 
    # Get the number of sampling points to interpolate through
    count = rs.GetInteger("Number of points in both u and v directions", 50, 2)
 
    #pSurface = []
 
    #Get the rest of the points
    step_u = (u1-u0)/count
    step_v = (v1-v0)/count
    for i in range(count):
        u = u0 + i*step_u
        for j in range(count):
            v = v0 + j*step_v
            point = parametric_equation(u,v)
            rs.AddPoint(point)
            #pSurface.append(point)
 
 
 
#Customizable function that solves a parametric equation 
def __CalculatePoint(u,v):
    #ex 1a. any graph z = f(x,y);  doman = [-10, 10] x [-10, 10]
    #x = u
    #y = v
    #z = math.sqrt(u**2 + v**2)
    #z = math.cos(math.sqrt(u**2+v**2))
    # ex 1b.  a cone parametrized in cylindrical coordinates; domain = [0, 2*pi]x[0, 5]
    #x = v*math.cos(u)
    #y = v*math.sin(u)
    #z = v
    #ex 2. Helicoid;  domain = [0, 2*pi]x[r1,r2]
    #x = v*math.cos(u)
    #y = v*math.sin(u)
    #z = u
    #ex 3. Catenoid;  domain = [0, 2*pi]x[a,b]
    #x = 5*math.cosh(v/5)*math.cos(u)
    #y = 5*math.cosh(v/5)*math.sin(u)
    #z = v
    #ex 4. Hyperboloid:
    #x = 2*math.sqrt(1 + v**2)*math.cos(u)
    #y = 2*math.sqrt(1 + v**2)*math.sin(u)
    #z = v
    #ex 5.  Elliptic Hyperboloid
    #x = 2*math.sqrt(1 + v**2)*math.cos(u)
    #y = 5*math.sqrt(1 + v**2)*math.sin(u)
    #z = 10*v
    #ex 6.  Torus; domain = [0, 2*pi]x[-3,3]
    x = (2-math.cos(v))*math.cos(u)
    y = (2-math.cos(v))*math.sin(u)
    z = math.sin(v)
    return x,y,z
 
##########################################################################
# Check to see if this file is being executed as the "main" python
# script instead of being used as a module by some other python script
# This allows us to use the module which ever way we want.
if( __name__ == "__main__" ):
    #Call the function passing another function as a parameter
    DrawParametricSurface(__CalculatePoint)


In-class assignment: Panelizing Surfaces

Assignment

Prepare a 1-page final project brief. This should include a problem statement, relevant context (images of site, building details), anticipated process. Please have this in your dropbox before class on April 20 .