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

Username:   Password: 
 RegisterRegister   
 Cool Textile-Like Patterns
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
GlobeTrotter




PostPosted: Sun Oct 16, 2005 6:09 pm   Post subject: Cool Textile-Like Patterns

code:

setscreen ("graphics:max;max,nobuttonbar")
for x : 1 .. maxx
    for y : 1 .. maxy
        if BOOLEAN EXPRESSION HERE then
            drawdot (x, y, 0)
        else
            drawdot (x, y, 7)
        end if
    end for
end for



Put any of the following into the code for different effects.

code:

(round (sin (x) / cos (y)) = 1) xor (sin (x) div cos (y) = 1)

code:

tan (x) div tan (y) = 1

code:

x mod y = 0

code:

x mod 5 = 0 or y mod 5 = 0

code:

(round (tan (x + y)) = 0) xor (round (tan (x / 2 + y / 2)) = 0)

code:

round (sin (x)) = 1 and round (cos (x)) = 1 and round (cos (x)) = 1 or round (sin (y)) = 1 and round (cos (y)) = 1 and round (cos (y)) = 1

code:

sind (x) + sind (y) = 0

code:

(round (sin (x)) = 1 and round (cos (x)) = 1 and round (cos (x)) = 1 or round (sin (y)) = 1 and round (cos (y)) = 1 and round (cos (y)) = 1) xor (round (sin (x) / cos (y)) = 1) xor (sin (x) div cos (y) = 1)


Post some you come up with
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Sun Oct 16, 2005 7:42 pm   Post subject: (No subject)

Nice and simple program Smile.

code:
setscreen ("graphics:max;max,nobuttonbar")
for x : 1 .. maxx
    for y : 1 .. maxy
        if (round (sin (x)) = 1 and round (cos (x)) = 1 and round (cos (x)) = 1 or round (sin (y)) = 1 and round (cos (y)) = 1 and round (cos (y)) = 1) xor (round (sin (x) / cos (y)) = 1) xor (sin (x) div cos (y) = 1) then
            drawdot (x, y, x mod 2)
        else
            drawdot (x, y, y mod 2)
        end if
    end for
end for


Also (insert this into my program, where the large expression is):
code:
(round (tan (x + y)) = 0) or (round (tan (x / 2 + y / 2)) = 0) or round (cos (x - y)) = 0


code:
tan (x) div tan (y) = 1 or tan (x - 5) < 1 and tan (y - 5) < 1
Mr. T




PostPosted: Sun Oct 16, 2005 8:35 pm   Post subject: Alex's Opinion

How do you come up with these patterns? Is it just guessing and checking? Confused
GlobeTrotter




PostPosted: Sun Oct 16, 2005 9:16 pm   Post subject: (No subject)

Yes
beard0




PostPosted: Sun Oct 16, 2005 9:53 pm   Post subject: (No subject)

code:
abs (sin (x) - cos (y)) < x/maxx

For the gradient pattern effect Very Happy
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: