CSC 151 2019S, Class 10: Documentation and precondition checking
Overview
- Guest lecture
- Preliminaries
- Notes and news
- Upcoming work
- Extra credit
- Friday PSA
- Questions
- Lab
- Debrief
Preliminaries
News / Etc.
- Mentor sessions Wednesday 8-9 p.m., Thursday 8-9 p.m., Sunday 5-6 p.m.
- On Monday, I will distribute the final class code of
conduct.
- I was sorry to see so few of you at Thursday’s important (but
depressing) (or perhaps inspiring) Convocation.
- It appears that some of you have not figured out that I have atypical
office-hour conventions: The first priority for office hours goes to
those who book times on https://rebelsky.as.me/schedule.php.
- Don’t forget to use the exam template.
- Thanks for all the good questions on the exams.
Upcoming work
- Reading due before class Monday
- Exam 1 due Tuesday night.
- Prologue due TONIGHT
- Epilogue due Wednesday
- Flash cards due Wednesday at 8:00 p.m.
- Covers Wednesday/Friday/Monday classes
- Lab writeup due before class Monday.
- Exercise: 6
- Subject: CSC 151.01 Writeup for Class 10 (YOUR NAMES)
- To: csc151-01-grader@grinnell.edu
- CS Extras, Thursday, 4:15 p.m. Science 3821: Sam talks about course design.
(Snacks at 4pm in the CS Commons.)
- Any Data Week activity this week.
- HackGC weekend of 15-17 February 2019.
- Acrobat performance 7pm in Harris.
- Conference Swim and Dive meet, 15-17 February 2019. Dive times
noon or 1, some time in afernoon, Fri and Sat.
- Lunar New Year Celebration, 6pm February 17, Harris Gym
- 3pm Saturday, Senior Day for Basketball.
- HIIT training, 4:30 pm, Tuesday, Dance Studio, Bear. (Cap of two EC units.)
- HIIT training, 10:00 am, Saturday, Dance Studio, Bear
- Hatha Yoga, 7:00 pm, Tuesday, Dance Studo, Bear. (Cap of two EC units.)
- Brazilian Jiu-Itsu, Wednesday and Friday, 6:30, Dance Studio (cap of two
EC units.)
- Any Sex Week activity this week. (If you don’t feel comfortable telling
me about the particular activity, you can just say that you participated
and give a vague reflection.)
- Boxing 2pm Dance Studio tomorrow.
Other good things
Friday PSA
- I am fortunate to teach you. Please take care of yourselves so that
my fortune can continue.
Questions
Guest lecture
- Welcome to Prof. Heather Richards-Rissetto
- She works with Maya sites in Honduras (Copan is one location)
- UNESCO world heritage site.
- They reconstruct the sites in virtual reality.
- They use Maya. Other people use Unreal Engine.
- Rome Reborn is a cool project.
- Immersive VR has been around for a long time
- Archaeologists have been doing this since 1995 (and perhaps before)
- Message: “The first Virtual Heritage conference (…) will
discuss the use of computer graphics to reconstruct buildings
which no longer work.
- Example: Google sketchup
- She started off in GIS (Geographic Information Systems)
- Iconography: Position is important (those higher can see further,
have more power)
- They use LiDAR data to understand the underlying topography.
- Understand what things looked like 1000+ years ago using the LiDAR
data.
- Transforms how we can look at things.
- Reconstructs the environment in raster graphics
- Automates a lot of things with scripting.
- Can then compute what is visible from any location. Lets
you look at relationships of visibility to status.
- Now looking at sound! (E.g., how far can you hear from the Jaguar
Stage)
- Most of the analysis had been in 2D (or 2.5D data)
- Since visibility was important, they’ve moved to VR stuff.
- Using photogrammetry (which Sam can’t spell). Take lots of shots
with a camera and make a 3D model.
- Relatively easy and low cost.
- Started Maya City Builder project in 2015 or so.
http://mayacitybuilder.org.
- Using procedural modeling, they can combine their laser scanning,
their photogrammetry, and their models
- Procedural modeling
- “What took me lots of time now gets done automatically” in terms of
designing structures.
Quiz
Cancelled.
Lab
Writeup: Exercise: 6
Debrief
Good preconditions for (largest-in-list lst)
.
- The parameter must be a list
- The list must be nonempty
- All elements of the list must be real numbers
Good postconditions for (largest-in-list lst)
, assuming we call
the result maximillian
.
maximillian
is equal to some element of the list
maximillian
is greater than or equal to all elements of the list
- If all the elements of the list are exact,
maximillian
is exact.
- If any elements of the list are inexact,
maximillian
is inexact.
Note: All of exercise 3 is about coming up with an appropriate procedure
that you then use with one of the “list combining” procedures.
To combine with a space
(define combine-with-space
(lambda (str1 str2)
(string-append str1 " " str2)))
; or
(define combine-with-space (section string-append <> " " <>))
To duplicate a string
(define duplicate-string
(lambda (str)
(string-append str str)))
; or
(define duplicate-string
(lambda (str)
(regexp-replace* #px"(.*)" str "\\1\\1")))
; or
(define duplicate-string
(section regexp-replace* #px"(.*)" <> "\\1\\1"))
To compare two strings for length
(define shorter
(lambda (str1 str2)
(< (string-length str1) (string-length str2))))