Create Unit Circle with its Sin Cos Animation

The mod1() function might be useful.

julia> mod1(180 + 181, 360)
1

Also, this code:

setfont("Georgia Bold", 73)
...
 text(string("sin $k")

is mixing the two Cairo text APIs and so won’t work the way you think.

1 Like

@cormullion

thanks for that mod1() function. You are an expert that is really active in Julia language.
it works as expected now… I was looking at the wrong place all this time thought the answer is using while and for loop.

1 Like