<<<<<<<<<<<<<<<<<

golf_green(golf) Golf Simulation golf_green(golf)

NAME

golf_green - Object that stores the information representing golf green surface geometry

DESCRIPTION

The main object in golf simulation containing golf green elevation data. This object is used (a) to create golf green geometry file; (b) to create golf green skirt geometry file; (c) to facilitate putting simulation.

SUPERCLASS

object

INSTANCE VARIABLES

clippor A polygon instance that is used to do golf green clipping against perimeter data. Its name is a concatenation of instance name and "_clippor". Clippor is created and used by the instance automatically.

data A data instance that is used by perimeter spline instance. Its name is a concatenation of instance name and "_data". Data is created and used by the instance automatically.

flip A variable indicating whether original elevation data should be flipped (multiplied by -1) or be taken as it is. The default is -1. Used internally for green geometry generation.

green_file A name of a file containing surveyor data.

min_height The lowest elevation value of the golf green.

mode An indicator if polygons generated should be triangles (value 1) or quadrilaterals (value 0). Default is 1.

normal[3] A unit normal to the golf green surface at the (x,y) location.

perimeter_file A name of a file containing the perimeter surveyor data.

perimeter_points A number of perimeter points generated by perimeter spline object. Default is 100.

prefix A name used as a prefix to generate geometry, scalar, and skirt file names.

scale A variable specifying the stretching of the green in vertical dimension. Default is 1.

spline A spline instance that is used for generating perimeter polygon data. Spline is created and used by the instance automatically.

spline_class A spline class name. Default is "k_spline".

x X coordinate of a selected point on the green surface.

y Y coordinate of a selected point on the green surface.

MESSAGES

@ (arg1, arg2) Sets x and y instance variables to arg1 and arg2 correspondingly. Arg2 may be omitted, in this case y remains unchanged.

clippor! Creates a polygon for clipping green against perimeter data.

elevations! Generates elevations data for all pairs of (x,y) belonging to the golf green grid (taken on two feet intervals). Here the information in green_file is used.

flip= argument Sets the flip value to the argument that can be 1 or -1. Minus one corresponds to the survey measurement of the green by using direct "pole" data, e.g. measure of how deep is green at each measuring point relative to the transit. This is the default. Flip one corresponds to the real elevation data.

flip? Returns flip value.

geometry! Creates geometry data (polygons) for movie byu format geometry file for the golf green. The name of the file composed from the prefix instance variable value and ".g" extension.

geometry? Sends to itself messages "elevations!", "normals!",

"perimeter!", "tag!", "polygons!", "output!", builds geometry file name from the prefix and returns it.

green_file= argument Sets the value of green_file to the argument.

green_file? Returns the value of the green_file.

min_height= argument Sets the value of min_height to the argument.

min_height? Returns the value of the min_height.

normal? Returns the value of the normal to the green surface at the point specified by x and y instance variables.

normals! Calculates normals to the golf green surface at all green grid points.

output! Sends to itself messages "geometry!", "scalar!", and "skirt!".

perimeter! If perimeter_file is specified it sends to itself messages "spline!" and "clippor!".

perimeter_file= argument Sets the value of perimeter_file to the argument.

perimeter_file? Returns the value of the perimeter_file.

perimeter_points= argument Sets the value of perimeter_points to the argument. Default is 100.

perimeter_points? Returns the value of perimeter_points.

polygons! Creates perimeter, internal and skirt polygons.

prefix= argument Sets the value of prefix to the argument. Default is nil.

prefix? Returns the value of prefix.

quadrilaterals! Sets the mode variable to OFF (zero).

scalar! Writes movie_byu scalar file named by concatenation of prefix value and ".s".

scale= argument Sets the value of scale to the argument. Default is 1.0.

scale? Returns the value of scale.

skirt! Writes movie_byu geometry file for green skirt named by concatenation of prefix value and ".k".

spline! Creates spline and data instances and reads in perimeter_file data into data object.

spline_class= argument Sets the value of spline_class to the argument. Default is k_spline.

spline_class? Returns the value of spline_class.

tag! If there is a perimeter file, checks points for inside / outside.

triangles! Sets the mode variable to ON (one).

x= argument Sets the value of x to the argument.

x? Returns the value of x.

y= argument Sets the value of y to the argument.

y? Returns the value of y.

z? Returns the value of z (elevation at a point with coordinates (x,y)). As a side effect it calculates a unit normal vector to the green surface at point (x,y).

EXAMPLE

SEE ALSO

slider, rkqc_solver


Please send comments and suggestions to
consult@rpi.edu