"""
Module to demonstrate the Point class
This module has a few simple functions that show how to use the Point3 class.
Author: Walker M. White (wmw2), Anne Bracy (awb93)
Date: February 14, 2018
"""
import shapes
def incr_x(q):
"""
Increments the x coord of p by 1
Example: (1,2,3) becomes (2,2,3)
The function does not return a value.
It just modifies the point "in place"
Parameter p: The point to adjust
Precondition: p is a Point3 object
"""
q.x = q.x+1
def copy2d(p):
"""
Makes a 2d copy of the point p
This function makes (and returns) a new point
that has the same x, y value as p, but whose
z value is 0.
Parameter p: The point to copy
Precondition: p is a Point3 object
"""
# Make a new point
q = shapes.Point3(p.x,p.y,0)
return q