gCAD3D 2.35
utemp.c File Reference

2D-functions for moebius circles More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_os.h"
#include "../ut/ut_obj.h"
#include "../ut/utemp.h"

Functions

int UT2D_Comp2Lns (Line2 *ln1, Line2 *ln2)
 
int UT2D_Ci2PtsDiam (Circ2 *ci, Point2 *p1, Point2 *p2)
 
int UT2D_Ci2PtsCentPer (Circ2 *ci, Point2 *pc, Point2 *pp)
 
int UT2D_Ci3Pts (Circ2 *ci, Point2 *p1, Point2 *p2, Point2 *p3)
 
int UT2D_FixPtsProd2Invs (Point2 *E, Point2 *F, ObjGX *ox1, ObjGX *ox2)
 
int UT2D_TouchLnLnPt (Circ2 *ci1, Circ2 *ci2, Line2 *l1, Line2 *l2, Point2 *pt)
 
Point2 UT2D_CiInvertPoint (Point2 *pt, Point2 *ci, double ri)
 ================================================================ More...
 
Point2 UT2D_LnInvertPoint (Point2 *pt, Line2 *ln)
 

Variables

const Point2 UT2D_PT_INFTY
 

Detailed Description

2D-functions for moebius circles

=====================================================
List_functions_start:
UT2D_Comp2Lns Compare <-- 2 lines
UT2D_Ci2PtsDiam Circle <-- 2 points on diameter
UT2D_Ci2PtsCentPer Circle <-- center & peripherical point
UT2D_Ci3Pts Circle <-- 3 points
UT2D_FixPtsProd2Invs Fixpoints <-- product of 2 inversions
UT2D_TouchLnLnPt Touching circles <-- 2 lines, 1 point
UT2D_CiInvertPoint Invert at circle <-- point
UT2D_LnInvertPoint Invert at line <-- point
List_functions_end:
=====================================================

Function Documentation

int UT2D_Comp2Lns ( Line2 ln1,
Line2 ln2 
)
UT2D_Comp2Lns Compare <-- 2 lines
Test ob 2 Linien genau auf der gleichen unbegrenzten Geraden liegen.
Compare two 2D-lines.
IN:
Line2 *ln1 ... line 1
Line2 *ln2 ... line 2
OUT:
Returncodes:
0 = non-identical lines
1 = identical lines
int UT2D_Ci2PtsDiam ( Circ2 ci,
Point2 p1,
Point2 p2 
)
UT2D_Ci2PtsDiam Circle <-- 2 points on diameter
Compute a circle from two points which are defining its diameter.
IN:
Point2 *p1 ... point 1
Point2 *p2 ... point 2
OUT:
Circ2 *ci ... circle
Returncode:
0 = OK
int UT2D_Ci2PtsCentPer ( Circ2 ci,
Point2 pc,
Point2 pp 
)
UT2D_Ci2PtsCentPer Circle <-- center & peripherical point
Compute a circle from center and peripherical point.
IN:
Point2 *pc ... center point
Point2 *pp ... peripherical point
OUT:
Circ2 *ci ... circle
Returncode:
0 = OK
int UT2D_Ci3Pts ( Circ2 ci,
Point2 p1,
Point2 p2,
Point2 p3 
)
UT2D_Ci3Pts Circle <-- 3 points
Compute a circle from three points.
The points may not be collinear.
IN:
Point2 *p1 ... point 1
Point2 *p2 ... point 2
Point2 *p3 ... point 3
OUT:
Circ2 *ci ... circle
Returncodes:
0 = OK
-1 = input error
int UT2D_FixPtsProd2Invs ( Point2 E,
Point2 F,
ObjGX ox1,
ObjGX ox2 
)
UT2D_FixPtsProd2Invs Fixpoints <-- product of 2 inversions
Compute the two different fixpoints of a product of two inversions whose
Moebius circles (circle or line) have no common point
(UT2D_PT_INFTY included; thus the Moebius circles may not be two lines).
If the Moebius circles are concentric circles the fixpoints are their
common centerpoint and UT2D_PT_INFTY.
IN:
ObjGX *ox1 ... Moebius circle 1 (circle)
ObjGX *ox2 ... Moebius circle 2 (circle or line)
(empty intersection with ox1!)
ox1 und ox2 duerfen sich nicht schneiden !
OUT:
Point2 *E ... fixpoint 1
Point2 *F ... fixpoint 2 (may be UT2D_PT_INFTY)
Returncodes:
0 = OK
-1 = internal error
-2 = input error
int UT2D_TouchLnLnPt ( Circ2 ci1,
Circ2 ci2,
Line2 l1,
Line2 l2,
Point2 pt 
)
UT2D_TouchLnLnPt Touching circles <-- 2 lines, 1 point
Compute two circles which touch two different lines and a point.
It is assumed that the lines are not parallel and that the point is
not incident with any of the two lines.
IN:
Line2 *l1 ... line 1
Line2 *l2 ... line 2
Point2 *pt ... a point
OUT:
Circ2 *ci1 ... touch circle 1
Circ2 *ci2 ... touch circle 2
Returncodes:
0 = OK
-1 = input error
Point2 UT2D_CiInvertPoint ( Point2 pt,
Point2 ci,
double  ri 
)

================================================================

UT2D_CiInvertPoint Invert at circle <-- point
Kreis aus ci-ri:
Wenn pt ausserhalb Kreis:
der Inverse Punkt ist der Mittelpunkt jener 2 Punkte, wo die
Tangenten vom Punkt pt an den Kreis den Kreis beruehren.
Wenn pt innerhalb Kreis: umgekehrt ...
Wenn pt genau am Kreis: Punkte ident ..
Wenn pt genau am KreisCenter: genau 1 Punkt im unendlichen ..
Invert (=mirror) a point at a circle.
The point may be infinite (=UT2D_PT_INFTY).
IN:
Point2 *pt ... point
Point2 *ci ... center of inversion (!=UT2D_PT_INFTY)
double ri ... radius of inversion
OUT:
Returncode:
inverse point (may be infinite)
Point2 UT2D_LnInvertPoint ( Point2 pt,
Line2 ln 
)
UT2D_LnInvertPoint Invert at line <-- point
Invert (=mirror) a point at a line.
The point may be infinite (=UT2D_PT_INFTY).
IN:
Point2 *pt ... point
Line2 *ln ... line of inversion
OUT:
Returncode:
inverse point (may be infinite)

Variable Documentation

const Point2 UT2D_PT_INFTY