Text Only
|
Text with Attachments
QB64.org Forum
Active Forums => Programs => Topic started by: Ashish on March 11, 2018, 01:00:54 pm
Title:
Arc Wave
Post by:
Ashish
on
March 11, 2018, 01:00:54 pm
Waves form by the harmonic motion of the arcs....
Code: QB64:
[Select]
_TITLE
"Arc Wave!"
SCREEN
_NEWIMAGE
(
600
,
600
,
32
)
angOffset#
=
0
DO
CLS
FOR
i
=
1
TO
30
r
=
i
*
8
drawArc
_WIDTH
/
2
,
_HEIGHT
/
2
,
r
,
_PI
,
_PI
+
ABS
(
SIN
(
angOffset#
+
i
/
10
)
*
_PI
)
NEXT
angOffset#
=
angOffset#
+
.01
_DISPLAY
_LIMIT
60
LOOP
SUB
drawArc
(
xx
,
yy
,
r
,
s#
,
e#
)
px
=
COS
(
s#
)
*
r
+
xx
py
=
SIN
(
s#
)
*
r
+
yy
FOR
i
=
s#
TO
e#
STEP
.02
x
=
COS
(
i
)
*
r
+
xx
y
=
SIN
(
i
)
*
r
+
yy
LINE
(
x
,
y
)
-
(
px
,
py
)
px
=
x
py
=
y
NEXT
END
SUB
Title:
Re: Arc Wave
Post by:
FellippeHeitor
on
March 11, 2018, 04:20:02 pm
That's beautiful Ashish.
Title:
Re: Arc Wave
Post by:
Ashish
on
March 12, 2018, 02:19:40 am
Quote from: FellippeHeitor on March 11, 2018, 04:20:02 pm
That's beautiful Ashish.
Thanks! :)
Text Only
|
Text with Attachments