top of page

Plot a Tan Wave

Plots a tan wave with the lbar command.

Program


---

Plot a tan wave with the plot command.

---


prog_vars =

d/angle 0.0

d/Xpos 0

d/raw_tan 0.0

d/tan_value 0.0

prog_vars.


prog_start =

pclear

ptl 10 0 ^ts=24^tc=blue^ "Plot a Tan wave"

prog_start.


prog_loop =

-- Calc tan of the abgle

tan /angle -> /raw_tan

-- Scale the tan wave to fit.

mapf -1 1 0 50 /raw_tan -> /tan_value


-- Plot the Tan wave.

plot 10 50 ^t1n=TAN^xdp=100^xp=/Xpos^v1=/tan_value^

inc /angle 0.1 -- 0.1 best


-- Check if we should exit.

any /Xpos > 100 -> exitprog

inc /Xpos

prog_loop.


prog_stop =

print "Good bye"

prog_stop.


bottom of page