Wordpress Themes
A Random Image

core.form-ula

Hashim Sulieman

Spiral Cladding

spiral-surface

All using Autolisp program SPIRAL-002.LSP and (4)POLAR ARRAY .

From right to left surfces created by:

(a)Adding Intermediate ARC between intersections. Then connecting using RULE SURFACE.

(b)Adding Intermediate LINE between intersections. Then connecting using RULE SURFACE.

(a)Connecting spirals using EDGE SURFACE.

SPIRAL-002.LSP : copy/paste:-

(defun c:Spiral ()
(setq OriginalOSMODE (getvar “OSMODE”))
(if (< OriginalOSMODE 16384)
(progn
(setq OSMODEchanged T)
(setvar “OSMODE” (+ 16384 OriginalOSMODE))
))
(setvar “CMDECHO” 0)

(setq
NumberOfPoints 100
HeightStart 0.0
HeightEnd 15.0 ; if HeightEnd = HeightStart, then spiral will be in a plane (the ground plane)
AngleStart 0.0
AngleEnd 720.0 ; if AngleEnd = AngleStart, then spiral will be a straight line
RadiusStart 5.0
RadiusEnd 2.0 ; if RadiusEnd = RadiusStart, then spiral will be a helix
)
; angles are specified in degrees, and are converted to radians in the program (with “dtr” function)

(setq SpiralPointlist nil)
; points defining the spiral are stored in “SpiralPointlist”
; which is a simple list of “coordinate triplets” (list of xyz coordinates)
; the list is then used to create a 3d polyline

(setq i 0) (while (<= i NumberOfPoints)
(setq
HeightCurrent (Slider 0 NumberOfPoints i HeightStart HeightEnd)
AngleCurrent (Slider 0 NumberOfPoints i AngleStart AngleEnd)
RadiusCurrent (Slider 0 NumberOfPoints i RadiusStart RadiusEnd)
)
(setq CurrentPoint (polar (list 0.0 0.0 HeightCurrent) (dtr AngleCurrent) RadiusCurrent))
(setq SpiralPointlist (append SpiralPointlist (list CurrentPoint)))
(setq i (1+ i)) )

(Create3DPoly SpiralPointlist nil)

; if you want to create a SPLINE instead of a POLYLINE, use the following line instead
; (CreateSpline SpiralPointlist nil nil nil)

; increments are “arithmetic”, simply adding a constant value to the previous value
; try using different methods to create different kinds of spirals
; (for example, the radius can get larger and smaller)
; if we keep track of two or more sets of points, they can be “connected” to create spiral surfaces or volumes

(setvar “OSMODE” OriginalOSMODE)
)

;——————————————————————————-
; DEGREES TO RADIANS —————————————- DEGREES TO RADIANS
(defun dtr (InputAngle)
(* pi (/ InputAngle 180.0))
)

;——————————————————————————-
; RADIANS TO DEGREES —————————————- RADIANS TO DEGREES
(defun rtd (InputAngle)
(* 180.0 (/ InputAngle pi))
)
;——————————————————————————-
; CREATE POLYLINE ————————– CREATE POLYLINE FROM LIST OF POINTS
(defun Create3DPoly ( ListOf3DPoints ClosePolyline / pt)
; ListOf3DPoints is a list of 3D points
; ClosePolyline is T or nil

(command “.3DPOLY”)
(foreach pt ListOf3DPoints
(command pt)
)
(if ClosePolyline
(command “CLOSE”)
(command “”)
)
)

;——————————————————————————-
; CREATE SPLINE —————————— CREATE SPLINE FROM LIST OF POINTS
(defun CreateSpline ( ListOfPoints CloseSpline FitPoint1 FitPoint2 / pt)
; ListOfPoints is a list of points
; CloseSpline is T or nil
; FitPoint1 may be a point, or nil; if a point, then determines tangent
; FitPoint2 may be a point, or nil; if a point, then determines tangent
; (if CloseSpline is T, then FitPoint2 is ignored)

(command “.SPLINE”)
(foreach pt ListOfPoints
(command pt)
)
(if CloseSpline
(command “CLOSE”)
(command “”)
)
(if FitPoint1
(command FitPoint1)
(command “”)
)
(if (and (not CloseSpline) FitPoint2)
(command FitPoint2)
(command “”)
)
)

;——————————————————————————-
; SLIDER —————————————————————- SLIDER
(defun Slider (minA maxA curA minB maxB)
;
; given minA maxA curA minB maxB, find curB
;
; minA curA maxA
; | V |
; +————————–+
; | ^ |
; minB curB maxB
;
(setq minA (float minA) maxA (float MaxA) curA (float curA))
(setq minB (float minB) maxB (float MaxB))

; if minApercent=0 and maxApercent=1, find curApercent
(if (= minA maxA) ; we will get a “divide by zero” error
(setq curApercent 0.0) ; we should check the consequences of this — is it correct?
(setq curApercent (/ (- curA minA) (- maxA minA))) ; <– this is the correct formula, if minA /= maxA
)

(setq curB (+ minb (* curApercent (- maxB minB))))
)

Popularity: 10% [?]

Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • Slashdot
  • SphereIt
  • StumbleUpon
  • Technorati
  • E-mail this story to a friend!
  • LinkedIn
, , , , , , , ,

Related Content
  • 1×1 unit example code and diagram
  • Structural Spiral Studies
  • Further Structural Spiral Studies
  • Twisting Towers
  • Best New Rhino Plugin 2008 Candidate
  • ------------------------------------------------------------------------------------------------------------

    One Comment, Comment or Ping

    1. AAqtash

      Hashim,
      Can you please do the following:
      The spiral shell looks interesting, next step, lets start to look at a proportion that is more along the lines of anywhere between 1-10 > 1-12 ( height to footprint ratio). If you can generate a few examples and see what types of structures emerge, it would be interesting to see. The different types of surface examples can be implemented along the vertical height of the structure. Maybe we can start to implement Ecotect and learn how to deploy the correct surface configuration. Where you need solar shading, you would use the concave formation to block the sun –i.e. southern exposure for horizontal louvers, maybe along the east and west it become convex. Try some of these options and see if the geometries you are generating have any advantages. Again, Neil and I will be available this weekend, so do write back and if you create these options this weekend. Thanks

    Reply to “Spiral Cladding”

    You must be logged in to post a comment.






    SparkStats