//: Playground - noun: a place where people can play
import Cocoa
var i = -6.28
while i < 6.28
{
var s1 = 4*sin(i) / 3.14
var s2 = 4*sin(3*i) / (3*3.14)
var s3 = 4*sin(5*i) / (5*3.14)
var s4 = 4*sin(7*i) / (7*3.14)
s1
s1+s2
s1+s2+s3
s1+s2+s3+s4
i += 0.1;
}
|
|