Qbasicnews.com
September 20, 2021, 03:07:52 AM
 Pages: 1 2 3 [4] 5
 Author Topic: PSET Circle!  (Read 42769 times)
Rattrapmax6
__/--\__

Posts: 2577

 « Reply #45 on: August 19, 2005, 06:44:52 PM »

More like "Talk about being bored",.. this thing had to be about 2,.. 3 pages back... unless he used search, or was reading over past articles of QBE and fond Pete's news article... either way...
 Logged

Kevin (x.t.r.GRAPHICS)

Ralph
Ancient Guru

Posts: 544

 « Reply #46 on: August 29, 2005, 02:02:37 PM »

I vote for Dark_Prevail's solution, but only if married to Meg's, thus:

Code:
FOR i = 0 TO 360
IF(i = 0 THEN screen 13 ELSE PSET (SIN(3.14*I / 180) * 30 + 160, COS(3.14*i / 180) * 30 + 100)
NEXT
 Logged

Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
dumbledore
Ancient Guru

Posts: 520

 « Reply #47 on: August 29, 2005, 04:04:19 PM »

Quote from: "Dr_Davenstein"
OK, why not?

Code:

Screen 18, 32
Do While InKey\$=""
Y=(Y+1)Mod 480
For X = 0 to 639
If ABS(SQR((320-X)^2 + (240-Y)^2))<= 255 then PSet(X,Y),RGB(0,0,255-ABS(SQR((320-X)^2 + (240-Y)^2)))
Next
Loop

Code:
For I = -1 to 479 * 639
If I = -1 Then Screen 18, 32 Else If ABS(SQR((320-(I MOD 640))^2 + (240-(I\640))^2))<= 255 then PSet((I MOD 640),(I\640)),RGB(0,0,255-ABS(SQR((320-(I MOD 640))^2 + (240-(I\640))^2)))
Next
Sleep
 Logged

ttp://m0n573r.afraid.org/
Quote from: "HexDude"
quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Dr_Davenstein
Na_th_an

Posts: 2052

 « Reply #48 on: August 29, 2005, 06:43:11 PM »

Wow, that's the coolest thing I've ever seen!

:rotfl:
 Logged
Dio
I hold this place together

Posts: 874

 « Reply #49 on: August 29, 2005, 07:50:30 PM »

i made something like that. and it took alot more lines of code to do it. (about 900% more. and i was so proud of myself. hmm...)

but yeah, really cool! =b
 Logged

quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Rattrapmax6
__/--\__

Posts: 2577

 « Reply #50 on: August 29, 2005, 07:52:17 PM »

:lol: I ment to tell ya,.. that was more of a PSET Sphere...  :rotfl: ... but its round, so, who cares...  :lol:

Funny how this lil challenge is still going.....  :roll:  :lol:
 Logged

Kevin (x.t.r.GRAPHICS)

Deleter
Na_th_an

Posts: 1293

 « Reply #51 on: August 29, 2005, 07:58:51 PM »

Quote from: "Rattrapmax6"
Funny how this lil challenge is still going.....  :roll:  :lol:

you never declared a winner, made a voting post of any kind, nor did you seta date. so of course its still going.
 Logged

Dr_Davenstein
Na_th_an

Posts: 2052

 « Reply #52 on: August 29, 2005, 08:43:06 PM »

Quote from: "Dio"
i made something like that. and it took alot more lines of code to do it. (about 900% more. and i was so proud of myself. hmm...)

but yeah, really cool! =b

Did you get the joke though?  :lol:
 Logged
Rattrapmax6
__/--\__

Posts: 2577

 « Reply #53 on: August 29, 2005, 08:52:43 PM »

Quote from: "Deleter"
Quote from: "Rattrapmax6"
Funny how this lil challenge is still going.....  :roll:  :lol:

you never declared a winner, made a voting post of any kind, nor did you seta date. so of course its still going.

Evil plan... but it works well don't it? Muhahahahaha!!!  :rotfl:
 Logged

Kevin (x.t.r.GRAPHICS)

dumbledore
Ancient Guru

Posts: 520

 « Reply #54 on: August 30, 2005, 02:15:40 AM »

ok, here's one i wrote meself:
[syntax="qbasic"]For i = -1 To 639 * 399
If i = -1 Then Screen 13 Else Pset( i Mod 639, i \ 639 ), -( Int( Sqr( ( 160 - ( i Mod 639 ) ) ^ 2 + ( 100 - ( i \ 639 ) ) ^ 2 ) ) = 50 ) * 15
Next[/syntax]
and in fb
[syntax="freebasic"]For i = -1 To 639 * 399
If i = -1 Then Screen 13 Else If Pset( i Mod 639, i \ 639 ), -( Int( Sqr( ( 160 - ( i Mod 639 ) ) ^ 2 + ( 100 - ( i \ 639 ) ) ^ 2 ) ) = 50 ) * 15 Else Sleep
Next[/syntax]
 Logged

ttp://m0n573r.afraid.org/
Quote from: "HexDude"
quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
Rattrapmax6
__/--\__

Posts: 2577

 « Reply #55 on: August 30, 2005, 11:29:34 AM »

You could have made the FB one 3 lines also..  :lol:

Code:
For i = -1 To 639 * 399
If i = -1 Then Screen 13 Else if i <> (639 * 399) THEN Pset( i Mod 639, i \ 639 ), -( Int( Sqr( ( 160 - ( i Mod 639 ) ) ^ 2 + ( 100 - ( i \ 639 ) ) ^ 2 ) ) = 50 ) * 15 else sleep
Next

 Logged

Kevin (x.t.r.GRAPHICS)

dumbledore
Ancient Guru

Posts: 520

 « Reply #56 on: August 30, 2005, 04:49:13 PM »

thx  :lol:
 Logged

ttp://m0n573r.afraid.org/
Quote from: "HexDude"
quote: "<+whtiger> you... you don't know which way the earth spins?" ... see... stupidity leads to reverence, reverence to shakiness, shakiness to... the dark side
...phear
axipher
Ancient Guru

Posts: 544

 « Reply #57 on: December 12, 2005, 11:45:43 PM »

I know I am digging up this old topic, but I need you PSET Circle making Guru's help, can you make a working circle drawer that you can set limits in like drawing a circle at points (1,1) to (16,16), and the circle not be drawn outside that area???
 Logged
Deleter
Na_th_an

Posts: 1293

 « Reply #58 on: December 13, 2005, 01:21:31 AM »

well, you can find the radius within that and then use a normal circle command.
radius in that would equal half the shorter side of your confining box, obviously placed in the middle.
 Logged

Nemesis
Forum Regular

Posts: 118

 « Reply #59 on: December 13, 2005, 02:33:49 AM »

Heh, I remember this topic from a few months back, it was kinda cool
so I mucked around with the original posters code and came up with this...
Code:

'\$DYNAMIC
DEFINT A-Z
SCREEN 13
CLS
DIM V(32001)
r# = ATN(1 / 4)
V(0) = 2560
V(1) = 200
DEF SEG = VARSEG(V(0))
DO
h = (h + 1) MOD 255
c = h
z = 75
FOR ii = 1 TO 150
z = z - 1
FOR i = 1 TO 360
d = i MOD 360
x = INT(z * (COS(r# * d))) + 159
y = INT(z * (SIN(r# * d))) + 99
c = c + 1
IF c > h THEN c = c - h
IF c >= 32767 THEN c = -32768
POKE (4 + (x + (y * 320&))), c
NEXT
NEXT
'
PUT (0, 0), V(0), PSET
'
p& = p& + 1
LOCATE 1, 1: PRINT p&; "      "
'
LOOP UNTIL LEN(INKEY\$)

Ummm.... sorry this wasn't the real cool one I did (can't find it
but, this one still produces some nice patterns.
(I think they repeat after 255 but, it will run a long time.)

Cya,

Nemesis
 Logged
 Pages: 1 2 3 [4] 5