03-17-2005, 02:47 PM
Quote:does any one under stand the math behind the circle? just checking
*frowns at diroga*
Yes, I do.
Quote:tetha
Dont you mean Theta

PSET Circle!
|
03-17-2005, 02:47 PM
Quote:does any one under stand the math behind the circle? just checking *frowns at diroga* Yes, I do. Quote:tetha Dont you mean Theta ![]()
03-17-2005, 10:22 PM
Quote:Oooooops :oops: Of course, Theta is EnglishNeo Wrote:tetha ![]()
03-18-2005, 12:27 AM
Code: PSET (100, 100), 15 ![]() ![]() ![]()
EEL THE BEAT OF EURODANCE!!!
![]()
03-18-2005, 01:36 AM
This obviously isn't an entry for this challenge, but it's a fun program nonetheless. ^_^
*peace* Meg [syntax="QBASIC"] 'THIS PROGRAM MAKES USE OF THE CROSSCIRCLE SUB TO DISPLAY CIRCLES WITH LINES 'CUTTING ACROSS THEM AT PRESET NODE POINTS. ' - Written 03/17/2005 by mb '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 'SUB DECLARATIONS '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ DECLARE SUB CrossCircle (x!, y!, r!, c%, n%, o!) '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 'CHANGE TO GRAPHICS MODE 320x200 '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ SCREEN 13 CLS '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 'ROTATE A 10-NODE, 40-RADIUS CIRCLE IN THE CENTER OF THE SCREEN '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ offset! = 0 DO offset! = offset! + .01 CrossCircle 160, 100, 40, 15, 10, offset! WAIT &H3DA, 8 WAIT &H3DA, 8, 8 CrossCircle 160, 100, 40, 0, 10, offset! LOOP UNTIL INKEY$ <> "" SYSTEM SUB CrossCircle (x!, y!, r!, c%, n%, o!) '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 'THIS SUB DRAWS NODES AROUND A CIRCLE AND CONNECTS THEM WITH LINES '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 'x! = x-coordinate of circle 'y! = y-coordinate of circle 'r! = radius of circle 'c% = color of circle 'n% = number of nodes in circle 'o! = offset of first node in radians '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 'MAKE OUR NODE COORDINATE ARRAYS '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ REDIM nodeX!(1 TO n%) REDIM nodeY!(1 TO n%) '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 'STARTING AT OFFSET o!, CREATE EVENLY SPACED NODES AROUND THE CIRCLE '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ NodeDist! = (2 * 3.14159) / n% NodeCurr! = o! FOR i% = 1 TO n% nodeX!(i%) = x! + COS(NodeCurr!) * r! nodeY!(i%) = y! - SIN(NodeCurr!) * r! NodeCurr! = NodeCurr! + NodeDist! NEXT i% '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 'CONNECT THE NODES TO EACH OTHER WITH LINES '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ FOR i% = 1 TO n% - 1 FOR j% = i% + 1 TO n% LINE (nodeX!(i%), nodeY!(i%))-(nodeX!(j%), nodeY!(j%)), c% NEXT j%, i% END SUB [/syntax]
03-18-2005, 02:27 AM
Quote:does any one under stand the math behind the circle? just checking Knows it here,.. :wink: ... do you? Quote:This obviously isn't an entry for this challenge, but it's a fun program nonetheless. ^_^ Wow, thats cool!! :bounce:
03-19-2005, 01:19 AM
Wow, that was great!
lol try doing it at 160, 100, 200, 15, 25, offset!!!!! Ha lol :lol: (FYI that rotates a 200 radius circle at the center of the screen, color 15, AND 25 nodes!) ![]() Oh ya I do too (understand the math behind it). I had to learn all that stuff when I learned 3D in QB. ![]()
i]"But...it was so beautifully done"[/i]
03-19-2005, 01:49 AM
i was messin' around with Diroga's entry just for fun and i made this:
[syntax="qbasic"]CLS SCREEN 13 rad = (3.14159265#) / 180 c = 16 z = 76 SLEEP FOR ii = 1 TO 75 z = z - 1 FOR i = 1 TO 361 STEP .5 oldx = x: oldy = y x = INT(z * (COS(rad * i))) + 160 y = INT(z * (SIN(rad * i))) + 100 c = c + 1: IF c > 31 THEN c = 16 PSET (x, y), c NEXT NEXT[/syntax]
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
03-19-2005, 03:59 AM
![]() [syntax="QBasic"]SCREEN 13 FOR a = 1 TO 360 x = a * COS(a * 3.14159265# / 180) y = 20 * SIN(a * 3.14159265# / 180) LINE (160, 100)-(160 + x, 100 - y), a NEXT[/syntax] :rotfl:
03-25-2005, 09:27 AM
Hey guess what? I was messing around with Dio's entry...hehe...oh no you say? Well, when I mess around with graphics, its more of a change here and see what happends :lol: ....well this was a little better than that...more math...not what I wanted it to do, but it looks cool:
[syntax="qbasic"] CLS SCREEN 13 rad = (3.14159265#) / 180 c = 16 z = 76 offset = 0 DO offset = offset + 1 ci = (ci + 5) MOD 255 c = 16 z = 76 FOR ii = 1 TO 150 z = z - 1 FOR i = 1 TO 361 STEP .5 oldx = x: oldy = y d = (i + offset) MOD 360 x = INT(z * (COS(rad * d))) + 160 y = INT(z * (SIN(rad * d))) + 100 c = c + 1: IF c > ci THEN c = 16 PSET (x, y), c NEXT NEXT LOOP [/syntax]
i]"But...it was so beautifully done"[/i]
|
« Next Oldest | Next Newest »
|