Permalink
Browse files

Add some lon-capa tweaks. Add comments pointing to Bug #1899.

Add operator for drawing acceleration with custom hints.
Add kq1 and mot5 to *sets*.  Remove some Andes2-related documentation.
  • Loading branch information...
1 parent d535890 commit 2162ed22caf1ade7e54e9b51183f50ddf2c3555c @bvds committed Sep 13, 2011
Showing with 84 additions and 11 deletions.
  1. +44 −2 KB/kinematics.cl
  2. +2 −7 KB/principles.cl
  3. BIN images/mot5.gif
  4. +2 −2 lon-capa/Makefile
  5. +36 −0 lon-capa/assignments.cl
View
@@ -715,7 +715,8 @@
;; for problems like the bumblebee where the trajectory over the interval
;; is irregular but the net displacement direction is known.
-(defoperator draw-displacement-given-dir (?b ?t)
+;; See bug #1899
+(defoperator draw-displacement-given-dir (?b ?t)
:description
"If you are given the direction of a net displacement over an interval
then draw a displacement vector for it in the direction of its motion."
@@ -1241,6 +1242,7 @@
(vector-diagram ?rot (relative-vel ?b1 ?b2 ?b3 ?t))
))
+;; See bug #1899
(defoperator draw-relative-vel-given-dir (?b1 ?b2 ?t)
:description "If the relative velocity vector of a body wrt to
something else is needed & the direction is given,
@@ -1662,6 +1664,7 @@
;; draw acceleration when all we are given is its direction, and have no
;; other specification about the motion. Used in simple vector problems.
+;; See bug #1899
(defoperator draw-accel-given-dir (?b ?t)
:description
"If you are given the direction of acceleration at some time
@@ -1692,6 +1695,44 @@
(bottom-out (string "The problem specifies that ~a is at ~a, so just draw an acceleration vector oriented at ~a." ((accel ?b :time ?t) def-np) ?dir ?dir))
))
+;; draw acceleration when all we are given is its direction, and have no
+;; other specification about the motion. Used in simple vector problems.
+;; See bug #1899
+(defoperator draw-accel-given-dir-with-hint (?b ?t)
+ :description
+ "If you are given the direction of acceleration at some time
+ then draw an acceleration vector for it in the given direction."
+ :preconditions
+ ((in-wm (given (dir (accel ?b :time ?t-given)) ?dir :hint ?hints))
+ (test ?hints)
+ (test (not (equal ?dir 'unknown)))
+ (time ?t)
+ (test (tinsidep ?t ?t-given))
+ ;; make sure no other motion specification in problem for time
+ ;; !! Too strict, some motion specs leave accel dir out.
+ (not (motion ?b ?dontcare :time ?t-motion . ?whatever)
+ (tinsidep ?t ?t-motion))
+ (not (vector ?b (accel ?b :time ?t) ?dir))
+ (bind ?mag-var (format-sym "a_~A~@[_~A~]" (body-name ?b) (time-abbrev ?t)))
+ (bind ?dir-var (format-sym "O~A" ?mag-var))
+ (bind ?dir-var-value (dir-var-value ?dir))
+ (bind ?hint1 (car ?hints))
+ (bind ?hint2 (second ?hints))
+ (bind ?hint3 (third ?hints))
+ )
+ :effects
+ ((vector ?b (accel ?b :time ?t) ?dir)
+ (variable ?mag-var (mag (accel ?b :time ?t)))
+ (variable ?dir-var (dir (accel ?b :time ?t)))
+ (given (dir (accel ?b :time ?t)) ?dir)
+ (implicit-eqn (= ?dir-var ?dir-var-value) (dir (accel ?b :time ?t)))
+ )
+ :hint
+ ((point (string "~a" (?hint1 identity)))
+ (teach (string "~a" (?hint2 identity)))
+ (bottom-out (string "~a" (?hint3 identity))))
+ )
+
;; draw average acceleration when we know that the motion is
;; curved (from a motion statement), but no direction is given.
(defoperator draw-accel-curved-unknown (?b ?t)
@@ -1856,7 +1897,7 @@
:effects
((eqn (= ?accel-var ?g-var) (free-fall-accel ?b ?t)))
:hint
- ((teach (string "If an object is in free-fall near a planet, its acceleration equals the acceleration due to gravity for that planet. The variable g is predefined in Andes to denote the magnitude of the gravitational acceleration, so you don't have to define g before you use it. However, you will have to enter an equation giving the value of g."))
+ ((teach (string "If an object is in free-fall near a planet, its acceleration equals the acceleration due to gravity for that planet. The variable <var>g</var> is predefined in Andes to denote the magnitude of the gravitational acceleration, so you don't have to define <var>g</var> before you use it. However, you will have to enter an equation giving the value of <var>g</var>."))
(bottom-out (string "Write the equation ~A." ((= ?accel-var ?g-var) algebra)))
))
@@ -1911,6 +1952,7 @@
;;; the projectile motion spec
;;; Like draw-centripetal-accel in pulling dir from curved motion spec,
;;; differing only in that it does not assume uniform circular motion.
+;; See bug #1899
(defoperator draw-accel-projectile-given-dir (?b ?t)
:preconditions
(
View
@@ -363,18 +363,13 @@
;;;
;;; List of Andes distribution homework sets
;;;
-;; This list was generated by applying the following perl script
-;; to problems/*.aps & problems/index.html.
-;; Remove videos *.wmv by hand and supplemental sets by hand.
-;;
-;; cd problems; perl -w -n -e 'if(m/"(.*?\.aps)">(.*?)</){open F,"< $1" or next;my @y=<F>;close F;shift @y;chomp(@y);print "(\"$2\" (@y))\n";}' index.html
;;
(defparameter *sets*
'("All Andes problems"
(
-("Vectors" (vec1ay vec1a vec1b vec1c vec1d vec1e vec1f vec2a vec2b vec2c vec2d vec2e vec2f vec3a vec3b vec3c vec3d vec4a vec4b vec4c vec4d vec5a vec5b vec5c vec5d vec6a vec6b vec6c vec6d vec7a vec8a vec8b vec8c vec9 relvel1a relvel2a relvel3a mot1 mot2 mot3 mot4 vec20 vec21))
+("Vectors" (vec1ay vec1a vec1b vec1c vec1d vec1e vec1f vec2a vec2b vec2c vec2d vec2e vec2f vec3a vec3b vec3c vec3d vec4a vec4b vec4c vec4d vec5a vec5b vec5c vec5d vec6a vec6b vec6c vec6d vec7a vec8a vec8b vec8c vec9 relvel1a relvel2a relvel3a mot1 mot2 mot3 mot4 mot5 vec20 vec21))
("Kinematics Graphs" (kgraph1 kgraph2 kgraph3 kgraph4 kgraph5 kgraph5b kgraph5c kgraph5d kgraph5e kgraph5f kgraph6 kgraph7 kgraph8 kgraph8b kgraph8c kgraph8d kgraph8e kgraph8f kgraph8g kgraph9 kgraph9b kgraph10 kgraph10b kgraph11 kgraph12 kgraph13 kgraph14 kgraph16 kgraph17 kgraph18 kgraph19 kgraph20 kgraph21 kgraph22 kgraph30 kgraph31))
-("Translational Kinematics" (kt1a kt1b kt2a kt2b kt3a kt3b kt4a kt4b kt4c kt5a kt6a kt6b kt7a kt7b kt8a kt8b kt9a kt9b kt9c kt10a kt10c kt11ay kt11a kt11b kt11c kt12a kt12b kt12c kt13a kt13b kt13c kt13d kt14a kt14b kt20 kt21))
+("Translational Kinematics" (kq1 kt1a kt1b kt2a kt2b kt3a kt3b kt4a kt4b kt4c kt5a kt6a kt6b kt7a kt7b kt8a kt8b kt9a kt9b kt9c kt10a kt10c kt11ay kt11a kt11b kt11c kt12a kt12b kt12c kt13a kt13b kt13c kt13d kt14a kt14b kt20 kt21))
("Free Body Diagrams" (fbd1a fbd1b fbd2a fbd3a fbd4a fbd5a fbd6a fbd8 fbd9 fbd10 fbd11 fbd12 fbd13 fbd14 fbd15 fbd16))
("Statics" (s1a s1b s1c s1d s1e s1f s2a s2b s2c s2d s2e s3a s3b s3c s4a s4b s5a s6a s7a s7b s8a s9a s10a s11a s11b s12a s13 s14 s15 s16 s17 s18 s19))
("Translational Dynamics" (dq1 dt1a dt1b dt1c dt2a dt3a dt3b dt3c dt4a dt4b dt5a dt6a dt6b dt6c dt7a dt7b dt8a dt9a dt9b dt10a dt11a dt11b dt12a dt13a dt13b dt14a dt14b dt16 dt17 dt18 dt19 dt20 dt21 dt22 dt23 dt24))
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -11,8 +11,8 @@ create:
push:
ssh ${SERVER} '(cd public_html/;rm -r -f *-problems/ *-maps/)'
- scp -r *-problems/ ${SERVER}:public_html/
- scp -r *-maps/ ${SERVER}:public_html/
+ scp -p -r *-problems/ ${SERVER}:public_html/
+ scp -p -r *-maps/ ${SERVER}:public_html/
@echo "On lon-capa server, as root do:"
@echo 'cd public_html/; chown -R www.bvds *-problems *-maps'
@@ -162,3 +162,39 @@
("Thin Film Interference" (Int2a int2b))
("Diffraction by Small Apertures" (Ref4a ref4b ref5a ref5b))
)))
+
+
+;;;;
+#|
+ (asdf:operate 'asdf:load-op 'lon-capa)
+ (lon-capa-problem-maps *sets* "/res/asu/bvds/all-problems"
+ :practice-p t
+ :exclude-sets *mamenko-2011*
+ :path #P"mamenko-maps/"
+ :title "Practice problems")
+(lon-capa-problem-maps *mamenko-2011* "/res/asu/bvds/all-problems"
+ :path #P"mamenko-maps/"
+ :title "Assigned problems")
+
+|#
+;;;;
+
+(defvar *mamenko-2011*
+'("First few weeks of assignments."
+(
+ ("Set 1: Translational Kinematics" (kt1a kt1b kt4a ;kt4b kt4c kt5a
+ kt6a kt6b kt7a kt8b ;kt9b kt9c
+ kt10c
+ ;kt11b kt11c
+ kt13a kt13d kgraph1 kgraph2 kgraph3 kgraph4 kgraph5
+ kgraph5b kgraph5c kgraph5d kgraph6 kgraph8
+ ))
+("Set 2: Vectors"
+ (
+ kt4b kt4c kt5a kt9c kt11b kt11c
+ vec1a vec1b vec1c vec1d vec1e vec3a vec3b vec3c vec6a vec6b vec6c vec6d))
+("Set 3: Translational Dynamics" (fbd1a fbd2a fbd3a
+ s1a s1b s1c s2a s2b s2c s2d ;s11a s11b
+ dq1 dt1a dt4a dt4b dt6b dt6c dt7a dt8a dt10a dt16 dt17))
+("Set 4: Energy and Work" (s11a s11b weq1 weq2 weq4 e1a e1b e3a e8a we1a))
+)))

0 comments on commit 2162ed2

Please sign in to comment.