Polybezier() - How to draw a sinus/cosinus?
Posted: Mon Jan 14, 2008 9:32 pm
title says it all.
i need the points coordinates.
i need the points coordinates.
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
OpenWindow(0,0,0,800,600,"",$ca0001)
InitSprite()
OpenWindowedScreen(WindowID(0),0,0,800,600,0,0,0)
*points=AllocateMemory(2*4*4)
PokeL(*points,100);start
PokeL(*points+4,100)
PokeL(*points+8,300);control
PokeL(*points+12,20)
PokeL(*points+16,500);control
PokeL(*points+20,580)
PokeL(*points+24,700);end
PokeL(*points+28,500)
hdc=StartDrawing(ScreenOutput())
FrontColor(#White)
PolyBezier_(hdc,*points,4)
StopDrawing()
Repeat
Until WaitWindowEvent()=16
Sure, but that's not the questionCalculates Sin-values. Really.