Author Topic: More Graphics Patterns  (Read 4130 times)

0 Members and 1 Guest are viewing this topic.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
More Graphics Patterns
« on: April 29, 2020, 07:30:40 pm »
Hi everyone,

First I want to say a I'm sorry for being gone since around December. The biggest reason I stopped programming is because I was just out of ideas for the kind of programming I knew and didn't have enough patience with myself to learn more. But finally today I decided to mess around with graphics patterns again. I've made similar stuff in the past but nothing exactly like this. I'm glad all or most of you are still around programming. The other day I removed my website of programs but I told myself that I can still post them here in the forum.

Code: QB64: [Select]
  1. SCREEN _NEWIMAGE(800, 600, 32)
  2. x2 = 400: y2 = 300
  3.     st = RND
  4.     c1 = INT(RND * 200) + 54
  5.     c2 = INT(RND * 200) + 54
  6.     c3 = INT(RND * 200) + 54
  7.     s = 0
  8.     FOR d = 0 TO 250 STEP st
  9.         _LIMIT 2000
  10.         s = s + 2
  11.         x = COS(s * 3.141592 / 30) * d
  12.         y = SIN(s * 3.151492 / 30) * d
  13.         CIRCLE (x + 400, y + 300), 20, _RGB32(c1, c2, c3)
  14.         PAINT (x + 400, y + 300), _RGB32(c1, c2, c3)
  15.     NEXT d
  16.  

 
« Last Edit: April 29, 2020, 07:34:00 pm by SierraKen »

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: More Graphics Patterns
« Reply #1 on: April 29, 2020, 07:37:56 pm »
Welcome back, it really is amazing the psychedelics that can be made with a few math functions and some trim code.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: More Graphics Patterns
« Reply #2 on: April 29, 2020, 07:47:32 pm »
Thanks OldMoses! LOL Yeah. I might tinker a bit more soon with programming, if I can think of stuff. :)

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: More Graphics Patterns
« Reply #3 on: April 29, 2020, 08:13:22 pm »
Welcome Ken - glad to have you around again.
You're not done when it works, you're done when it's right.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: More Graphics Patterns
« Reply #4 on: April 29, 2020, 09:01:04 pm »
Thanks Static. :)

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: More Graphics Patterns
« Reply #5 on: April 29, 2020, 09:13:32 pm »
Hey @SierraKen,

I was wondering where you were.

I leaned allot from playing with graphics.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: More Graphics Patterns
« Reply #6 on: April 29, 2020, 11:11:49 pm »
Hey bplus, thanks. I just didn't want to cause a scene. Anyway, I hope to keep programming sometimes. Probably won't be as much as before. Plus having a website made it even more work on me. Now I don't have to worry about that.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: More Graphics Patterns
« Reply #7 on: April 30, 2020, 05:12:09 pm »
Hi Ken.  Nice effect in a small amount of code.  Weird -- I was working on almost the exact same kind of thing.  We must be on the same wave length or something!  Well, here's mine...

Code: QB64: [Select]
  1.  
  2. SCREEN _NEWIMAGE(600, 600, 32)
  3.  
  4. x = _WIDTH / 2
  5. y = _HEIGHT / 2
  6.  
  7.     v = RND * 100 + 5
  8.     FOR t = 1 TO x
  9.         x1 = (COS(t) * z) + x
  10.         y1 = (SIN(t) * z) + y
  11.         fill = _RGB(r, g, b)
  12.         CIRCLE (x1, y1), z / v, fill
  13.         PAINT (x1, y1), fill
  14.         z = z + 1: IF z > x * 2.1 THEN z = 1
  15.         r = r + 1: IF r > 255 THEN r = RND * 255
  16.         g = g + 1: IF g > 255 THEN g = RND * 255
  17.         b = b + 1: IF b > 255 THEN b = RND * 255
  18.         _LIMIT 1000
  19.     NEXT t
  20.  
  21.  

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: More Graphics Patterns
« Reply #8 on: April 30, 2020, 06:29:10 pm »
Hi Dav! That is awesome! I just found mine by chance by messing with my old spiral code. :) Good job.