Syntax
[PL,n,d3]=PLof3dist(d1,d2,[d3,srt])
Input Parameter
d1 : | | distance in x |
d2 : | | radius at second point |
d3 : | | radius at third/first point point; |
srt : | | sort by length; default is false |
Output Parameter
PL : | | Point list |
n : | | area of triangle |
d3 : | | d3 |
Examples
PLof3dist(35,30,45)
PLof3dist(35,30,45,true)
Copyright 2017-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, PLof3dist
, is designed to create a 3-point tracker geometry using specified distances. It is part of the SolidGeometry library.
Input Parameters
- d1: Distance along the x-axis.
- d2: Radius at the second point.
- d3: Radius at the third/first point. If not provided, it is calculated as
sqrt(d1^2 + d2^2)
.
- srt: Boolean to sort by length. Default is
false
.
Output Results
- PL: A list of points representing the geometry.
- n: The area of the triangle formed by the points.
- d3: The third distance, which may be recalculated or sorted.
Algorithm Steps
- Calculate
d3
as sqrt(d1^2 + d2^2)
if not provided.
- Check if
srt
is true. If so, sort d1
, d2
, and d3
in ascending order and reassign them.
- Define point
A0
at the origin [0, 0]
.
- Define point
B0
at [d1, 0]
.
- Calculate point
C0
using the function cross2circ
with inputs A0
, B0
, d3
, and d2
.
- If
C0
is NaN
, throw an error indicating no solution exists if d1 > d2 + d3
.
- Construct the point list
PL
with points A0
, B0
, and C0
.
- Calculate the area
n
of the triangle using the cross product of vectors [B0 0] - [A0 0]
and [C0 0] - [A0 0]
.
- If
n
is less than 1e-12
, issue a warning indicating a straight line.
- If no output is requested, plot the geometry using
SGfigure
and CPLplot
.
Algorithm explaination created using ChatGPT on 2025-08-19 01:25. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21