نرم افزار آرشیم - صفحه چهارم
صفحه 4 از 4
6. مثال ها :
# Example
# 2D. Polar Coordinates
z = 0
# t-parameter
tmin = 0
tmax = 10*pi
# Calculations
r = t / 6
# Polar Coordinates
x = r * cos(t)
y = r * sin(t)
# Example
z = 0
# t-parameter
tmin = 0
tmax = 2*pi
# Calculations
x = 1 * (5*cos(t) - cos(6*t))
y = 1 * (3*sin(t) - sin(4*t))
# Example
# 3D Function
# Grid
xgrid = 100
zgrid = 4
# Calculations
y = 1 / x
# Example
# 3D. Parametric Function
# Center & Scale
ycenter = 25; scale = 50
# p,q - parameters
pmin = 0; pmax = 50
qmin = 0; qmax = 3
# Grid
pgrid = 200; qgrid = 3
# Constants
a = 2; b = 3
# Calculations
x = 20 * sin(p / a)
y = p + q
z = 20 * cos(p / b)