Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Graphics: What can we spawn ourselves in code?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Atma Weapon




PostPosted: Sat Oct 02, 2010 3:28 am   Post subject: Graphics: What can we spawn ourselves in code?

This issue is mostly a mathematical one and I'd appreciate it so much if any of those programming wizards out there can pop in for a sec and give some advice.

I use my own humble GUI commands when programming, just simply using procedures that use "Draw.Box/Draw.FillBox" to create windows and frames, I'd like some help making them better. I know that whatever I draw on screen is colour limited, and that using jpgs and fancy fonts would make things look nicer but that sort of solution isn't very instructive. I remember old SNES RPGs and their gradient colour backgrounds and patterns that look like wood or marble and use a very limited palette. I don't program very often, and am always looking to increase my ability through writing code. So today I've come to ask for some assistance.

Turing:
proc DrawFancyBox (x, y, bheight : int)
    var x2, y2 : int
    var ratio:real:=1.6
    x2 := x+round(bheight *ratio)
    y2 := y+bheight
    Draw.Box (x, y, x2, y2, 255)
    Draw.Box (x + 1, y + 1, x2 - 1, y2 - 1, 30)
    Draw.Box (x + 2, y + 2, x2 - 2, y2 - 2, 31)
    Draw.Box (x + 3, y + 3, x2 - 3, y2 - 3, 30)
    Draw.Box (x + 4, y + 4, x2 - 4, y2 - 4, 255)
    Draw.FillBox (x + 5, y + 5, x2 - 5, y2 - 5, 32)
    %Fractal Pattern Start


    %Fractal Pattern Finish
end DrawFancyBox

DrawFancyBox(100,100,100)


The next step in my mind is, creating recursive patterns that print a pattern onto say, the area inside the box. I know a little about recursion but this is not a totally technical problem, it's also somewhat artistic. Anyone out there with old code they could show or willing to create something new and show it off?

I'm making this topic for anyone to share their opinions/code about how this sort of thing could/should look. There are some really talented coders here at Compsci. Once, years ago, I saw someone demonstrate generating wood and metal textures with perlin noise and arrays.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: