Week 1 - PowerPoint PPT Presentation

About This Presentation
Title:

Week 1

Description:

so writing your algo is like putting together a lego toy...you just put the pieces together. ... your circle-sphere intersection algo. in this space. Week 5 ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 7
Provided by: pierre49
Learn more at: https://www.algogeom.org
Category:
Tags: algo | week

less

Transcript and Presenter's Notes

Title: Week 1


1
Week 1
Learn to program simple Java algos, automating
familiar math concepts
Example As the mouse is being dragged around the
screen, calculate its distance from a fixed point
of your choosing. Stream text results to console
window. Start by writing a general method for
computing the distance between 2 points.
Your Java might look like this (dont sweat the
details, well teach you)
// distance function
public static double distance (Vec2 p1,
Vec2 p2) double dx p2.x - p1.x
double dy p2.y - p1.y return
Math.sqrt(dxdx dydy)
2
Week 12
Your library of 2D objects and algos is about 80
complete -- youre applying it to solve problems
this complex
Example Two overlapping circles intersect at two
points. Given center radius for each
circle, calculate the 2 intersection points
Solution sketch might look like this
A little algebra will solve thiseasier version
of the problem!!
3
Java might look like this (Dont worry about
understanding Java syntaxwell teach you!
// intersection Points Of 2
Circles public
static TwoPoints intersectionOf (Circle C1,
Circle C2) if (C1.degenerate()
C2.degenerate()) return null // need good data
// ask HELPER function for NumIntersectPts int
n Circle.numIntersectionPts(C1, C2) if (n
0 n3) return null // no intersection points
to compute // there are 1 or 2 intersection
points // transform into easier-to-solve case,
where C1 is at origin, and C2 out on x-axis
Circle C2_p C2.coordTranslate(C1.c) // shift
C2 into C1-local coordinates DirVec2 C1_C2_dir
new DirVec2(C1.c, C2.c) // direction going
from C1 ? C2 Circle C2_pp C2_p.coordRotate(C1_
C2_dir) // rotate coords putting C2_pp on
x-axis
Youll have written these functions BEFORE
starting into this problem C1.degenerate() Circl
e.numIntersectionPts(C1, C2) C2.coordTranslate(new
Origin) C2_p.coordRotate(newzXaxis) so writing
your algo is like putting together a lego toyyou
just put the pieces together. You understand
what each piece does, since you developed and
tested it yourself earlier!The sketch is your
high-level plan saying how to assemble the toy!
Translating your sketch into Java code will
become a routine at some pointyoull know how.
4
Week 25
Your 3D library is now chock full of goodies, and
your head is brimmin with a whole new
understanding of 3D geometry
You can now solve problems like this.
A 3D circle pierces through a sphere at 2
points.write an algo that computes their
intersection points i1 i2
SPH
i2
CIR
i1
Given SPH c r CIR c orient r
Compute Results numIntersectionPoints ( 0, 1, 2,
8 ) point locations i1 i2
Once this is solved, youll know how a GPS
receiver works in 3D!
5
Youll spend lots of time in a 3D workspace
Youll test your circle-sphere intersection
algo in this space
6
Week 33
Paydirt. Well coach you through your choice 3D
projects, any of which will impress the pants
off your college profs job interviewers
Pick any 2
  • 3D wireframe graphics (moving viewer)
  • robotic gas station attendant CAD rendering of
    pipe outlines (moving viewer) computer vision
    optical ray tracing (reflection and refraction)
    molecular brownian rotation interstellar
    navigation (camera-based star-tracking)

We get you this far this fast due to new,
simplified geometry theory, and turning your
laptop into an extension of your brainyour
personal math slave.
AlgoGeom - an intellectual adventure that will
last a lifetime.
Course pacing estimates based on 4.1 hours per
week.
Write a Comment
User Comments (0)
About PowerShow.com