Commit 6d75fb05 authored by Dave Cooper's avatar Dave Cooper
Browse files

adding sections to g102-tud training. Added with-htm operator.

parent d2df457e
......@@ -31,44 +31,90 @@
(with-cl-who-string ()
(:h2 "Documenation and Educational Resources")
(:h3 "Lecture and Tutorial Videos")
(:h3 "Emacs Tutorial Videos")
((:div :class "profile")
((:div :class "people")
(:h4 "Videos: Gendl Introduction to Emacs")
(:h4 "Standard Emacs Tutorial:")
(:p "Use this "
((:a :href "http://www.youtube.com/playlist?list=PLCD0CCC8235C9E988" :target "gdl-videos") (:b "playlist"))
" to play all these videos one after another, or individually:")
" (23:36) to play all these videos one after another, or individually:")
(:ol
(:li ((:a :href "http://www.youtube.com/watch?v=1kcspOlfrc4&hd=1" :target "gdl-videos")
"Emacs Tutorial Part 1: Moving around Emacs"))
"Emacs Tutorial Part 1") ": Moving around Emacs (5:09)")
(:li ((:a :href "http://www.youtube.com/watch?v=7093SgxBQ9M&hd=1" :target "gdl-videos")
"Emacs Tutorial Part 2: Files and Buffers (4:28)"))
"Emacs Tutorial Part 2") ": Files and Buffers (4:28)")
(:li ((:a :href "http://www.youtube.com/watch?v=-Wr7X6RV_qw&hd=1" :target "gdl-videos")
"Emacs Tutorial Part 3: Cutting/Copying & Pasting, Searching, Tutorial Conclusion (4:58)"))
(:li ((:a :href "http://www.youtube.com/watch?v=Z4XLEG8Jj3E&hd=1" :target "gdl-videos")
"Introduction to Emacs for Gendl Editing"))
)
"Emacs Tutorial Part 3") ": Cutting/Copying & Pasting, Searching, Tutorial Conclusion (4:58)"))
:br
(:h4 "Gendl Authoring with Emacs:")
(:p "Use this "
((:a :href "http://www.youtube.com/playlist?list=PLCD0CCC8235C9E988" :target "gdl-videos") (:b "playlist"))
" (23:36) to play all these videos one after another, or individually:")
(:ol
(:li ((:a :href "http://www.youtube.com/watch?v=GYJwwYJQfJg&hd=1" :target "gdl-videos")
"Emacs for Gendl Editing Part 1 (4:55)"))
(:li "...Stay tuned for more parts in this series..."))))
(:h3 "Gendl Lecture and Tutorial Videos")
((:div :class "profile")
((:div :class "people")
(:h4 "G102-TUD (G102 with examples from TU Delft Advanced Design Methods Course)")
:br
(:h4 "Lecture Slides & Code:")
(:p
(:ol
(:li ((:a :href "http://www.genworks.com/downloads/training-g102-tud/" :target "g102-slides") "Lecture Slides"))
(:li "Sample code for:"
(:ul (:li ((:a :href "https://github.com/genworks/Genworks-GDL/blob/master/documentation/training/g102-tud/examples/source/ch2-examples.lisp"
:target "gendl-code") "Section 2 (Objects)"))
(:li ((:a :href "https://github.com/genworks/Genworks-GDL/blob/master/documentation/training/g102-tud/examples/source/ch3-examples.lisp"
:target "gendl-code") "Section 3 (Geometry)"))))))
(:p ". The exercise solutions will be provided after you have had a chance to try them yourself.")
(:h4 "G102: GenDL Quickstart (examples customized for TU Delft ADM Course)")
(:p "Slides are available " ((:a :href "http://www.genworks.com/downloads/training-g102-tud/" :target "g102-slides") "here") ", "
"Sample code " ((:a :href "https://github.com/genworks/Genworks-GDL/blob/master/documentation/training/g102-tud/examples/source/ch2-examples.lisp"
:target "gendl-code") "here")
". The exercise solutions will be provided later, after you have had a chance to try them yourself.")
:br
(:h4 "Videos:")
(:p "Use this "
((:a :href "http://www.youtube.com/playlist?list=PL3DEECB461E154659" :target "gdl-videos") (:b "playlist"))
" (32:56) to play all these videos one after another, or individually:")
(:h4 "G102: GenDL Quickstart (old slides)")
(:ol
(:li ((:a :href "http://www.youtube.com/watch?v=2ybhiiw7Z0M&hd=1" :target "gdl-videos")
"G102-TUD Seminar Part 1 (4:55)")
" Basic introduction and defining a first Common Lisp function")
(:li ((:a :href "http://www.youtube.com/watch?v=f8fra0SVFyU&hd=1" :target "gdl-videos")
"G102-TUD Seminar Part 2 (4:59)")
" Up through the concept of (setq self (make-object ...))")
(:li ((:a :href "http://www.youtube.com/watch?v=dlIWDhDLSPU&hd=1" :target "gdl-videos")
"G102-TUD Seminar Part 3 (4:23)")
" Shorthand for setting self to a new instance; Defining an object which takes
inputs, and providing input values when creating an instance.")
(:li ((:a :href "http://www.youtube.com/watch?v=AK9pLmU_L18&hd=1" :target "gdl-videos")
"G102-TUD Seminar Part 4 (4:54)")
" Different types of input-slots; Exercise 1 involving input-slots;
Inroduction to Child objects.")
(:li ((:a :href "http://www.youtube.com/watch?v=ZHxYhbst3Zc&hd=1" :target "gdl-videos")
"G102-TUD Seminar Part 5 (4:53)")
" Working with standard object sequences (via aggregate objects) ")
(:li ((:a :href "http://www.youtube.com/watch?v=RUYP8_e4QN0&hd=1" :target "gdl-videos")
"G102-TUD Seminar Part 6 (4:29)")
" Lisp background on plists. Exercise 2 using plist to feed a sequenced child object.")
(:li ((:a :href "http://www.youtube.com/watch?v=MucUXirjVnA&hd=1" :target "gdl-videos")
"G102-TUD Seminar Part 7 (4:20)")
" Gendl Functions, and Exercise 3 involving Gendl Functions."))
#|
(:h4 "G102: GenDL Quickstart")
(:p "Slides are available " ((:a :href "http://www.genworks.com/downloads/training-g102/" :target "g102-slides") "here") ", "
"Exercise skeletons " ((:a :href "https://github.com/genworks/Genworks-GDL/blob/master/documentation/training/g102/examples/source/g102-exercises.lisp?raw=true" :target "gendl-code") "here") ", and "
"Sample code from the slides " ((:a :href "https://github.com/genworks/Genworks-GDL/blob/master/documentation/training/g102/examples/source/section-2-examples.lisp?raw=true" :target "gendl-code") "here") ".")
(:h4 "Lecture Videos for Some of the Slides")
(:p "You can play all the G102 videos, one after another, using this "
......@@ -94,7 +140,10 @@
(:li ((:a :href "http://www.youtube.com/watch?v=ZuYOZ33PiDI&hd=1" :target "gdl-videos")
"Section 2.11: Child Objects (5:02)"))
(:li ((:a :href "http://www.youtube.com/watch?v=bIu_AywMMQU&hd=1" :target "gdl-videos")
"Section 2.12: GenDL Object Sequences (4:44)")))))
"Section 2.12: GenDL Object Sequences (4:44)")))
|#
))
(:h3 "Manuals and Tutorials")
((:div :class "profile")
......
......@@ -17,6 +17,17 @@
;; <http://www.gnu.org/licenses/>.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ATTENTION!!!
ATTENTION!!! DO NOT LOOK AT THIS SOURCE UNTIL YOU TRY THE EXERCISES YOURSELF!!!
ATTENTION!!!
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package :gdl-user)
(define-object fuselage (cylinder)
......
;;
;; Copyright 2012 Genworks International and the Delft University of
;; Technology
;;
;; This source file contains free software: you can redistribute it
;; and/or modify it under the terms of the GNU Affero General Public
;; License as published by the Free Software Foundation, either
;; version 3 of the License, or (at your option) any later version.
;;
;; This source file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public
;; License along with this source file. If not, see
;; <http://www.gnu.org/licenses/>.
;;
(in-package :gdl-user)
(define-object single-box (base-object)
:computed-slots
((length 10)
(width 16.18)
(height 3.2))
:objects
((box :type 'box
:length (the length)
:width (the width)
:height (the height))))
(define-object single-box-trickle (base-object)
:computed-slots
((length 10)
(width 16.18)
(height 3.2))
:objects
((box :type 'box)))
(define-object five-boxes (base-object)
:computed-slots
((length 9)
(width 4)
(height 1)
(display-controls (list :line-thickness 2))
(box-width 1)
(box-length 1)
(box-height 1))
:objects
((middle :type 'box
:length (the box-length)
:width (the box-width)
:height (the box-height))
(right-rear :type 'box
:length (the box-length)
:width (the box-width)
:height (the box-height)
:display-controls (append (the display-controls)
(list :color :green-forest))
:center (translate (the center)
:right (half (the width))
:rear (half (the length))))
(right-front :type 'box
:length (the box-length)
:width (the box-width)
:height (the box-height)
:display-controls (append (the display-controls)
(list :color :green-lime))
:center (translate (the center)
:right (half (the width))
:front (half (the length))))
(left-rear :type 'box
:display-controls (append (the display-controls)
(list :color :red-orange))
:length (the box-length)
:width (the box-width)
:height (the box-height)
:center (translate (the center)
:left (half (the width))
:rear (half (the length))))
(left-front :type 'box
:display-controls (append (the display-controls)
(list :color :scarlet))
:length (the box-length)
:width (the box-width)
:height (the box-height)
:center (translate (the center)
:left (half (the width))
:front (half (the length))))))
(define-object tilted-monolith (base-object)
:input-slots
((length 9)
(width 4)
(height 1))
:objects
((monolith :type 'box)
(tilted :type 'box
:display-controls (list :color :red :line-thickness 2)
:orientation (alignment :top
(rotate-vector-d
(the (face-normal-vector :top))
45
(the (face-normal-vector :rear)))
:rear
(the (face-normal-vector :rear))))))
(define-object cylinder-sample (cylinder)
:computed-slots
((display-controls (list :line-thickness 2 :color :pink-spicy))
(length 10)
(radius 3)
(number-of-sections 25)))
(define-object cone-sample (cone)
:computed-slots
((display-controls (list :line-thickness 2
:color :blue-neon :transparency 0.5
:shininess 0.8 :specular-color :white))
(length 10)
(radius-1 2)
(inner-radius-1 1)
(radius-2 5)
(number-of-sections 5)
(inner-radius-2 3)))
(define-object sphere-sample (sphere)
:computed-slots
((radius 150)
(number-of-vertical-sections 10)
(number-of-horizontal-sections 10)
(display-controls (list :line-thickness 2
:color :green-forest-medium))))
(define-object spherical-cap-sample (spherical-cap)
:computed-slots
((base-radius 150)
(cap-thickness 7)
(axis-length (* (the base-radius) +phi+))
(number-of-vertical-sections 10)
(number-of-horizontal-sections 10)
(display-controls (list :line-thickness 2
:color :orchid-medium :transparency 0.5))))
(define-object torus-sample (torus)
:computed-slots
((major-radius 150)
(minor-radius 42)
(draw-centerline-arc? t)
(number-of-longitudinal-sections 10)
(number-of-transverse-sections 10)
(display-controls (list :line-thickness 2
:color :green-forest-medium))))
(define-object global-filleted-polygon-projection-sample
(global-filleted-polygon-projection)
:computed-slots
((display-controls (list :line-thickness 2
:color :blue-steel :transparency 0.3
:shininess 0.7 :spectral-color :white))
(default-radius 5)
(projection-depth 5)
(vertex-list (list (make-point 0 0 0)
(make-point 10 10 0)
(make-point 30 10 0)
(make-point 40 0 0)
(make-point 30 -10 0)
(make-point 10 -10 0)
(make-point 0 0 0)))))
(define-object simple-curve (base-object)
:input-slots ((control-points (list (make-point -2 0 0)
(make-point -1 1 0)
(make-point 1 1 0)
(make-point 2 0 0))))
:objects ((curve :type 'b-spline-curve
:control-points (the control-points))
(points :type 'points-display
:points (the control-points))))
(define-object simple-curve-set (base-object)
:input-slots ((control-points (list (make-point -2 0 0)
(make-point -1 1 0)
(make-point 1 1 0)
(make-point 2 0 0))))
:objects ((curves :type 'b-spline-curve
:sequence (:size 6)
:degree (1+ (the-child index))
:control-points (the control-points))
(points :type 'points-display
:points (the control-points))))
(define-object simple-surface (base-object)
:input-slots ((control-points
(list
(list (make-point -2 0 -2)
(make-point -1 1 -2)
(make-point 1 1 -2)
(make-point 2 0 -2))
(list (make-point -2 0 -1)
(make-point -1 2 -1)
(make-point 1 2 -1)
(make-point 2 0 -1))
(list (make-point -2 0 1)
(make-point -1 2 1)
(make-point 1 2 1)
(make-point 2 0 1))
(list (make-point -2 0 2)
(make-point -1 1 2)
(make-point 1 1 2)
(make-point 2 0 2)))))
:objects ((surface :type 'b-spline-surface
:display-controls (list :color :blue
:line-thickness 2
:bezier-points t)
:control-points (the control-points))))
(define-object simple-surface-set (base-object)
:input-slots ((control-points
(list
(list (make-point -2 0 -2)
(make-point -1 1 -2)
(make-point 1 1 -2)
(make-point 2 0 -2))
(list (make-point -2 0 -1)
(make-point -1 2 -1)
(make-point 1 2 -1)
(make-point 2 0 -1))
(list (make-point -2 0 1)
(make-point -1 2 1)
(make-point 1 2 1)
(make-point 2 0 1))
(list (make-point -2 0 2)
(make-point -1 1 2)
(make-point 1 1 2)
(make-point 2 0 2)))))
:objects ((surfaces :type 'b-spline-surface
:sequence (:size 6)
:u-degree (1+ (the-child index))
:display-controls (list :color :blue
:line-thickness 2
:bezier-points t)
:control-points (the control-points))))
(define-object boxed-curves-example (base-object)
:objects
((wavy :type 'b-spline-curve
:control-points (list (make-point -2 0 0)
(make-point -1 1 0)
(make-point 1 1 0)
(make-point 2 0 0)
(make-point 3 0 00)))
(translated :type 'boxed-curve
:display-controls (list :color :red :line-thickness 2)
:curve-in (the wavy)
:center (translate (the center) :right 5))
(translated-rotated :type 'boxed-curve
:display-controls (list :color :green :line-thickness 2)
:curve-in (the translated)
:orientation (alignment :rear
(the (face-normal-vector :left))))
(mirrored :type 'boxed-curve
:display-controls (list :color :blue :line-thickness 2)
:curve-in (the wavy)
:orientation (alignment :rear (the (face-normal-vector :front))
:right (the (face-normal-vector :right))
:top (the (face-normal-vector :top))))
(mirrored-2 :type 'boxed-curve
:display-controls (list :color :orange :line-thickness 2)
:curve-in (the translated)
:orientation (alignment :rear (the (face-normal-vector :front))
:right (the (face-normal-vector :right))
:top (the (face-normal-vector :top))))
(mirrored-3 :type 'boxed-curve
:display-controls (list :color :pink :line-thickness 2)
:curve-in (the translated-rotated)
:from-orientation (the orientation)
:orientation (alignment :rear (the (face-normal-vector :rear))
:right (the (face-normal-vector :left))
:top (the (face-normal-vector :top))))))
(define-object box-cone-unite (base-object)
:hidden-objects
((cone :type 'cone-solid
:length 100
:radius-1 5
:radius-2 20)
(box :type 'box-solid
:length 50
:width 50
:height 50))
:objects
((united :type 'united-solid
:display-controls (list :line-thickness 2 :color :red)
:brep (the box)
:other-brep (the cone))))
(define-object box-cone-subtract (base-object)
:hidden-objects
((cone :type 'cone-solid
:length 100
:radius-1 5
:radius-2 20)
(box :type 'box-solid
:length 50
:width 50
:height 50))
:objects
((subtracted :type 'subtracted-solid
:display-controls (list :line-thickness 2 :color :green
:transparency 0.3)
:brep (the box)
:other-brep (the cone))))
(define-object box-cone-intersect (base-object)
:hidden-objects
((cone :type 'cone-solid
:length 100
:radius-1 5
:radius-2 20)
(box :type 'box-solid
:length 50
:width 50
:height 50))
:objects
((intersect :type 'intersected-solid
:display-controls (list :line-thickness 2 :color :blue)
:brep (the box)
:other-brep (the cone))))
(define-object airfoil (base-object)
:input-slots ((control-points
'(#(0.0 0.0 0.05)
#(9.5 0.0 2.0)
#(17.0 0.0 2.0)
#(22.0 0.0 0.0)
#(17.0 0.0 -2.0)
#(9.5 0.0 -2.0)
#(0.0 0.0 -0.05)))
(number-of-profiles 5)
(span 108))
:computed-slots ((profile-spacing (/ (the span)
(1- (the number-of-profiles)))))
:hidden-objects ((profile-curves :type 'boxed-curve
:sequence (:size (the number-of-profiles))
:curve-in (the profile)
:center (translate (the center)
:rear
(* (the-child index)
(the profile-spacing))))
(bspline :type 'b-spline-curve
:control-points (the control-points))
(trailing-edge-line :type 'linear-curve
:start (the bspline start)
:end (the bspline end))
(profile :type 'composed-curve
:curves (list (the bspline) (the trailing-edge-line))))
:objects ((loft :type 'lofted-surface
:synchronized? t
:curves (list-elements (the profile-curves)))))
(define-object merged-airfoil (base-object)
:input-slots ((span 108))
:computed-slots
((chord (3d-distance (the airfoil (profile-curves 0) (point 0.5))
(the airfoil (profile-curves 0) start))))
:hidden-objects
((airfoil :type 'airfoil
:span (the span))
(ends :type 'rectangular-surface
:sequence (:size 2)
:width (* (the chord) 2.5)
:length (the-child width)
:center (ecase (the-child index)
(0 (translate (the airfoil profile-curves first start)
:rear
(* (the airfoil span) 0.05)))
(1 (translate (the airfoil profile-curves last start)
:front
(* (the airfoil span) 0.05))))
:orientation (alignment :top (the (face-normal-vector :rear))))
(spar :type 'rectangular-surface
:center (translate (midpoint (the airfoil (profile-curves 0) start)
(the airfoil (profile-curves 0) (point 0.5)))
:rear (half (the airfoil span)))