Advanced C++ Programming Tutorial 1

From Chilipedia
Revision as of 20:23, 16 May 2018 by Chili (Talk | contribs) (Links)

Jump to: navigation, search

In this video, we learn to draw straight lines (not homophobic) between any 2 points. Seriously though, linear equations permeate pretty much all of the things, so you might as well invest time timemoneybucks into not being utter shit at them.

Video Timestamp Index

Tutorial 1

Links

Homework

For the homework, solve the following math problems. All the problems should be solved algebraically where possible (i.e. not by simply graphing and observing).

  1. Plot the line y=(6/9)x+3.
  2. Determine whether the following points are on the line y=(6/9)x+3:
    1. (-2,1)
    2. (3,5)
  3. Find the point of intersection of the lines y=(6/9)x+3 and y=2x+7.
  4. Determine whether these two line segments intersect and where: (0,7)--(4,15) and (-6,-1)--(6,7).
  5. Find the equation of the line that is perpendicular to y=(6/9)x+3 and intersects it at x=3.
  6. Find the midpoint between (-5,-3) and (0,7).
  7. Find the perpendicular bisector line segment to make a "perfect X" with line segment (-5,-3)--(0,7) (here, perfect X means both line segments are same length).
  8. Find the closest point on the line y=(6/9)x+3 to the point (5,2).
  9. Find the distance between the point (5,2) and the line y=(6/9)x+3.
  10. Determine whether the circle of radius 5 at (5,2) intersects with the line y=(6/9)x+3.
  11. Determine whether the circle of radius 5 at (5,2) intersects with the line segment (6,7)--(12,11).
  12. Find points of intersection between the circle of radius 5 at (5,2) and the line y=(6/9)x+3.
  13. Find the value that is 20% on the way from 69 to 420.
  14. Find the point that is 69% from (6,9) to (4,20).
  15. Find the color C3 that is a blend 69% from C1 (42,230,156) to C2 (200,60,200).
  16. You have a horizontal UI slider that has an x range of 223 to 273. It controls a strength value ranging from 5 to 100.
    1. Find the mathematical function that computes the strength value given the x position of the slider.
    2. The damage value for an attack is calculated as dmg=(3/2)str+10. Find the function that computes attack damage given the slider position.