Sindbad~EG File Manager

Current Path : /home/beeson/public_html/dynamicgeometry/org/dynamicgeometry/scripts/
Upload File :
Current File : //home/beeson/public_html/dynamicgeometry/org/dynamicgeometry/scripts/DropPerpendicularScript.java

/** Author:  M. Beeson
*   Geoscript for dropping a perpendicular to line AB from point C not on line AB.
*   Returns the point of intersection of the perpendicular with line AB.
*   This code is in the public domain.
*/
package org.dynamicgeometry.scripts;
public class DropPerpendicularScript extends Scripts

     { DropPerpendicularScript()
          { super("DropPerpendicular","Point",new String[]{"A","B","C"},
                                              new String[]{"Point", "Point", "Point"},
                  new String[]{
                     "s = Line(A,B);", // the line to receive the perpendicular from C
                      // first we need a point D on the other side of AB from C
                     "D = Extend(C,B,C,B);",
                     "L = Circle(C,D);",
                     "G = IntersectLineCircle1(A,B,C,D);",
                     "E = IntersectLineCircle2(A,B,C,D);",
                     "F = BisectAngle(G,C,E);",
                     "t = Segment(C,F);",
		             "return F and s and t;"
		             },
		              new String[] {"Point", "Line", "Segment"}
		          );
          }
     }

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists