Commit 49396e82 authored by Dave Cooper's avatar Dave Cooper
Browse files

added TUD slides, updated g102 slides.

parent 81d20579
......@@ -92,52 +92,7 @@
(define-object fuel-tank ()
:input-slots
(l w h)
:computed-slots
((volume (* (the l)
(the w)
(the h)))))
(define-object wing-with-tanks (empty-surface)
:input-slots
((Tmax-list (list 1000 800 900 1200) :settable)
(b 30)
(c-root 6 :settable)
(c-tip 3 :settable)
(tank-data (list (list :w 4 :l 3.5 :h .3 )
(list :w 2 :l 2.5 :h .2 )
(list :w 1.5 :l 2 :h 0.15)))
(other-inputs "..."))
:computed-slots
((Tmax-total (sum-elements (the engines) (the-element Tmax)))
(tank-volume (sum-elements (the fuel-tanks) (the-element volume)))
(c-avg (/ (+ (the c-root) (the c-tip)) 2))
(taper (/ (the c-tip) (the c-root)))
(S (* (the b) (the c-avg)))
(A (/ (expt (the b) 2) (the S))))
:objects
((engines :type 'engine
:sequence (:size (length (the Tmax-list)))
:Tmax (nth (the-child index) (the Tmax-list)))
(fuel-tanks :type 'fuel-tank
:sequence (:size (length (the tank-data)))
:l (getf (nth (the-child index) (the tank-data)) :l)
:w (getf (nth (the-child index) (the tank-data)) :w)
:h (getf (nth (the-child index) (the tank-data)) :h))))
(define-object aircraft (base-object)
......
......@@ -41,6 +41,52 @@
(slenderness (/ (the l) (the d)))))
(define-object fuel-tank ()
:input-slots
(l w h)
:computed-slots
((volume (* (the l)
(the w)
(the h)))))
(define-object wing-with-tanks (empty-surface)
:input-slots
((Tmax-list (list 1000 800 900 1200) :settable)
(b 30)
(c-root 6 :settable)
(c-tip 3 :settable)
(tank-data (list (list :w 4 :l 3.5 :h .3 )
(list :w 2 :l 2.5 :h .2 )
(list :w 1.5 :l 2 :h 0.15)))
(other-inputs "..."))
:computed-slots
((Tmax-total (sum-elements (the engines) (the-element Tmax)))
(tank-volume (sum-elements (the fuel-tanks) (the-element volume)))
(c-avg (/ (+ (the c-root) (the c-tip)) 2))
(taper (/ (the c-tip) (the c-root)))
(S (* (the b) (the c-avg)))
(A (/ (expt (the b) 2) (the S))))
:objects
((engines :type 'engine
:sequence (:size (length (the Tmax-list)))
:Tmax (nth (the-child index) (the Tmax-list)))
(fuel-tanks :type 'fuel-tank
:sequence (:size (length (the tank-data)))
:l (getf (nth (the-child index) (the tank-data)) :l)
:w (getf (nth (the-child index) (the tank-data)) :w)
:h (getf (nth (the-child index) (the tank-data)) :h))))
(define-object aircraft-with-lift (base-object)
......
......@@ -58,16 +58,13 @@
((:define-object gdl-user::empty-surface)))
(:description ,(with-cl-who-string
()
(:description ,(with-htm
((:span :class "gdl-operator") "define-object") " - main operator used in GenDL to create definitions."))
(:description ,(with-cl-who-string
()
(:description ,(with-htm
((:span :class "gdl-object-def") "empty-surface") " - Name of our new definition."))
(:description ,(with-cl-who-string
()
(:description ,(with-htm
((:span :class "gdl-object-def") "base-object") " - Name of single mixin (should be pre-defined)."))))
(:title "Basic Wing Skeleton"
......@@ -75,16 +72,19 @@
((:description "Define a wing with initial slots, mixes in empty surface to start with"
:examples
((:define-object gdl-user::wing)))
(:description ,(with-cl-who-string
()
(:description ,(with-htm
((:span :class "gdl-object-def") "wing") " - our new definition name."))
(:description ,(with-cl-who-string
()
(:description ,(with-htm
((:span :class "gdl-object-def") "empty-surface") " - Name of single mixin (which we already defined)."))
(:description ,(with-cl-who-string
()
(:description ,(with-htm
((:span :class "gdl-section-keyword") ":computed-slots") " - constant and computed values which can be
\"answered\" by instances of this definition."))))
\"answered\" by instances of this definition."))
(:description ,(with-htm (:small
(:i "Example code is "
((:a :href "https://github.com/genworks/Genworks-GDL/blob/master/documentation/training/g102-tud/examples/source/ch2-examples.lisp")
"here")
". Press \"Raw\" for raw downloadable form."))))))
(:title ,(with-cl-who-string
......@@ -140,7 +140,14 @@
(:description "So there is heavy use of \"the\" inside most object definitions:"
:examples
((:define-object gdl-user::wing)))))
((:define-object gdl-user::wing)))
(:description ,(with-htm (:small
(:i
"Example code is "
((:a :href "https://github.com/genworks/Genworks-GDL/blob/master/documentation/training/g102-tud/examples/source/ch2-examples.lisp")
"here")
". Press \"Raw\" for raw downloadable form."))))))
(:title "Making and Using Objects in \"tasty\""
......@@ -195,7 +202,14 @@
((:span :class "gdl-section-keyword") ":input-slots")
" to be able to give values to certain slots at the time of an object's birth.")
:image-url "uml-2-8.png"
:examples ((:define-object gdl-user::wing-with-input)))))
:examples ((:define-object gdl-user::wing-with-input)))
(:description ,(with-htm (:small
(:i
"Example code is "
((:a :href "https://github.com/genworks/Genworks-GDL/blob/master/documentation/training/g102-tud/examples/source/ch2-examples.lisp")
"here")
". Press \"Raw\" for raw downloadable form."))))))
(:title ,(with-htm ((:span :class "gdl-section-keyword") ":input-slots"))
......@@ -227,8 +241,13 @@
:bullet-points
((:description "This wing has two settable input-slots"
:image-url "uml-2-9c.png"
:examples ((:define-object gdl-user::wing-more-inputs)))))
:examples ((:define-object gdl-user::wing-more-inputs)))
(:description ,(with-htm (:small
"Example code is "
((:a :href "https://github.com/genworks/Genworks-GDL/blob/master/documentation/training/g102-tud/examples/source/ch2-examples.lisp")
"here")
". Press \"Raw\" for raw downloadable form.")))))
(:title "Open it in Tasty"
:bullet-points
......@@ -258,7 +277,13 @@
((:description "Don't look at this until You Try It:"
:image-url "uml-2-10b.png"
:examples
((:define-object gdl-user::fuselage)))))
((:define-object gdl-user::fuselage)))
(:description ,(with-htm (:small
"Solutions code is "
((:a :href "https://github.com/genworks/Genworks-GDL/blob/master/documentation/training/g102-tud/examples/source/ch2-solutions.lisp")
"here")
". Press \"Raw\" for raw downloadable form.")))))
(:title "Child Object in a Sequence"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment