v sine (fig graphics)

vsine

 

#### license: creative commons cc0 1.0 (public domain)
#### http://creativecommons.org/publicdomain/zero/1.0/
proginf = "v sine 2017 mn"
function rgbcolour r g b c
python
    figcgapal[c] = (r, g, b)
    fig
    fig
v 1
c 400
w 3.14159 divby 2
for r 490 175 -.125
    e w minus 0.00413367105263 swap e w # 3.14159 / 4 / (490 - 300)
    for p -3.14159 3.14159 .003067958984375
        t w cos times 380 divby 2 int
        rc r divby 2.5 int
        rd 256 minus rc rgbcolour rc rc 32 11
        e w sin times t times 2 plus r plus 7 divby 5
        x p times 2 cos times e plus c int
        y p times 2 sin times e plus r minus 50  int
        m 6.28 plus 1.57 divby 108.503 divby 2
        now v plus m swap now v
        rc r divby 4 int mod 2
        iftrue rc
            now v int mod 2 times 11 pset x y now
            y2 y minus 1 pset x y2 now
            fig
        next
    now display
    next
now display lineinput

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s