scientimate.pointscart#
xpoints, ypoints, distxy = scientimate.pointscart(x1, y1, x2, y2, nmidpoints=1, dispout='no')
Description#
Generate points between point (x1,y1) and (x2,y2) on cartesian coordinate
Inputs#
- x1
x of start point (first point)
- y1
y of start point (first point)
- x2
x of end point (last point)
- y2
y of end point (last point)
- nmidpoints=1
- Number of middle points generated between first point and last pointnmidpoints=1;: 1 point between first point and last point is generated
- dispout=’no’
Define to display outputs or not (‘yes’: display, ‘no’: not display)
Outputs#
- xpoint
- x of points from (x1,y1) and (x2,y2)x1 and x2 are included, total number of points are nmidpoints+2
- ypoint
- y of points from (x1,y1) and (x2,y2)y1 and y2 are included, total number of points are nmidpoints+2
- distxy
Distance at each points of (xpoint,ypoint) from the first point of (x1,y1)
Examples#
import scientimate as sm
x1=-3
y1=-3
x2=3
y2=3
xpoints,ypoints,distxy=sm.pointscart(x1,y1,x2,y2,10,'yes')