Image_Graph
[ class tree: Image_Graph ] [ index: Image_Graph ] [ all elements ]

Class: Image_Graph_Tool

Source Location: /Image_Graph-0.6.0/Graph/Tool.php

Class Overview


This class contains a set of tool-functions.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • Copyright (C) 2003, 2004 Jesper Veggerby Hansen

Methods


Inherited Variables

Inherited Methods


Class Details

[line 43]
This class contains a set of tool-functions.

These functions are all to be called statically



[ Top ]


Method Detail

bezier   [line 110]

double bezier( double $t, double $p1, double $p2, double $p3, double $p4)

Calculates a Bezier point, this function must be called for BOTH X and Y coordinates (will it work for 3D coordinates!?)
  • Return: The bezier value of the point t between $p2 and $p3 using $p1 and $p4 to calculate control points

Parameters:

double   $t   —  A position between $p2 and $p3, value between 0 and 1
double   $p1   —  Point to use for calculating control points
double   $p2   —  Point 1 to calculate bezier curve between
double   $p3   —  Point 2 to calculate bezier curve between
double   $p4   —  Point to use for calculating control points

[ Top ]

controlPoint   [line 85]

double controlPoint( double $p1, double $p2, double $factor, [ $smoothFactor = 0.75])

Calculates a Bezier control point, this function must be called for BOTH X and Y coordinates (will it work for 3D coordinates!?)
  • Return: P1 mirrored in P2 by Factor

Parameters:

double   $p1   —  1st point
double   $p2   —  Point to
double   $factor   —  Mirror factor, 0 returns P2, 1 returns a pure mirror, i.e. P1 on the exact other side of P2
   $smoothFactor   — 

[ Top ]

mid   [line 54]

double mid( double $p1, double $p2)

Return the average of 2 points
  • Return: The average of P1 and P2

Parameters:

double   $p1   —  P1 1st point
double   $p2   —  P2 2nd point

[ Top ]

mirror   [line 69]

double mirror( double $p1, $p2, [double $factor = 1], double $o2)

Mirrors P1 in P2 by a amount of Factor
  • Return: mirrored in $p2 by Factor

Parameters:

double   $p1   —  1st point, point to mirror
double   $o2   —  2nd point, mirror point
double   $factor   —  Mirror factor, 0 returns $p2, 1 returns a pure mirror, ie $p1 on the exact other side of $p2
   $p2   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:17:08 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.