trianglez | xltronic messageboard
 
You are not logged in!

F.A.Q
Log in

Register
  
 
  
 
Now online (1)
belb
...and 149 guests

Last 5 registered
Oplandisks
nothingstar
N_loop
yipe
foxtrotromeo

Browse members...
  
 
Members 8025
Messages 2613408
Today 0
Topics 127499
  
 
Messageboard index
trianglez
 

redi v ider on 2001-10-17 06:44 [#00042534]



i added another applet to my site if any of you would like
to see it:

http://www.geocities.com/autocatalysis/code/seed.html


 

...mm M mm... on 2001-10-17 06:52 [#00042544]



That's very interesting too, just like your new pixel, makes
a twisted cooridor effect. I have sort of an idea for one,
have a six sided star (with 6 points going outward and 6
indentations going inward obviously) Now make the
indentations drift outward and the outer points drift inward
to make a new star in reverse. Then just do something more
interesting off of that idea, maybe have 32 sides or
something. I sent my drawings yesterday afternoon, you can
look at them, use them for kindling etc.


 

re di vider on 2001-10-17 06:59 [#00042549]



that would be really cool... maybe i could also have the
vertices of the star moving around at random, or in cool
ordered patterns...


 

wMmm...M...mmMw on 2001-10-17 07:11 [#00042550]



Yeah, randomness makes almost everything better. I love
videogames, and random elements are always the most
enjoyable, such as in doom2 where every time you play the
same level, it's different because of the chaos of the many
interacting monsters... whereas in the N64's goldeneye
shooter is practically the same every time you play the same
level. Random enemy placement upon starting, random wall
locations, random exit points, all would make it better.


 

wMmm...M...mmMw on 2001-10-17 07:18 [#00042551]



I'm going to have to get into that code someday. So you use
a "random number generator" for random stuff? I forget how
that works exactly, it can't be completely random, that's
impossible. It divides a 4 digit number by something then
takes the last 2 digits and divides again..., I forget.


 

red iv ider on 2001-10-17 07:20 [#00042552]



yea java has a random number class included, i have no idea
how it works, but you're right - it's not purely random.
theoretically nothing is, the term "pseudo-random" is used a
lot to describe things that for all intents and purposes are
random.


 

re di vider on 2001-10-17 07:24 [#00042553]



oh yea and you can draw that pattern yourself with a pencil
- you just draw a triangle, but on the last leg, when you go
to connect it to make a complete triangle, keep going just a
little further and make a slight overhang. then, from that
overhang, draw a line to the next corner of the triangle,
but overhang it again, etc. etc. so you'll end up going in
a "circle" around the triangle. my friend showed me how to
draw it but it took me a while to figure out how to
implement in code.


 

wMmm...M...mmMw on 2001-10-17 07:29 [#00042554]



So basically you take classes in college about "java" to
learn this great stuff? I suppose I could find books and
read myself to avoid a series of painful classes. You could
have a square incribed in a circle incribed in a square
inscribed in a circle... repeat etc. and all the squares
rotate slowly clockwise and they grow bigger slowly. But it
could be a loop, the 2nd to last square would turn until it
is in the exact same spot and size as the outermost square
previously was. I saw a neat simple proof that a square
incribed in a circle inscribed in a square has exactly half
the area of the outer square (in some mensa book I got at
that library sell).


 

wMmm...M...mmMw on 2001-10-17 07:36 [#00042555]



Yes, I see now, it's a lot simpler when you locate the rule
guiding it's construction. There's so much that is possible
to do... You could make every next triangle a brighter
yellow...make the tempo be slow at start and increase for
each one... have 2 triangle patterns going at once... have a
square instead... have every overhand be slightly longer
(proportional to the others) etc. I'll be hooked if I ever
learn that stuff. I'll try to make psychotic videogames out
of it. We need some new videogame makers, ones that use
hypnotizing patterns and such.


 

red ivi der on 2001-10-17 07:37 [#00042556]



you know, you really should check out programming, i think
you definitely have the mind for it. since i did take a
class, i don't know all the good resources for learning,
here's a good section of the sun tutorial to check out:

http://java.sun.com/docs/books/tutorial/java/nutsandbolts/i
ndex.html

if you'd really like to learn, i'd suggest doing a search in
google for "java tutorial" and see what comes up. once you
know the basics, you can start being creative with it, and
learning more will happen automatically as questions
naturally arise. it's fun shit.


 

redivid e r on 2001-10-17 07:40 [#00042557]



hell yea man you've got the idea - anything you can think of
that is discrete in nature can be done. sometimes figuring
out how to do it can be a bitch though, there's been lots of
times where i just lie on my bed, concentrating hard as hell
for like 10 minutes straight trying to organize everything
in my head. but when you finally get the prog to work you
get this rush of excitement...


 

wMmm...M...mmMw on 2001-10-17 07:44 [#00042558]



So "java" is a software program? Do you have to know all
kinds of weird computer input lingo, typing weird commands
and stuff, or can you use windows or something and control
it more intuitively, visually? I'll definately check it out
eventually.


 

wMmm...M...mmMw on 2001-10-17 07:47 [#00042559]



...turning your imagination into a code the computer can
understand, seeing the end result of a wicked imagined...
thing you came up with must be amazing. Computers are
amazing, hell a toaster is amazing. I don't know if our
species will survive much longer.


 

rediv i der on 2001-10-17 07:47 [#00042560]



java is a programming language, it scares most people when
they first look at it. here's the code to that triangle
thing (it probably will look even more cryptic because in
notepad i have it formatted to be more easily readable but i
doubt this board will preserve the formatting):

import java.lang.*;
import java.math.*;
import java.util.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;

public class Seed extends Applet implements Runnable
{
Thread main = new Thread(this);
int[] array = new int[6];
int x;
int y;
int x2;
int y2;
int xincr;
int yincr;
int red = 5;
int green = 5;
int blue = 5;

public void init()
{
main.start();
}

public void run()
{
for(int index = 0; index < 6; index++)
{
array[index] = 360 - (int)
(Math.round(Math.random() * 40));
}

x = array[0];
y = array[1];
x2 = array[2];
y2 = array[3];

repaint();
try
{
main.sleep(30);
}
catch(Exception q){}

x = array[2];
y = array[3];
x2 = array[4];
y2 = array[5];

repaint();
try
{
main.sleep(30);
}
catch(Exception q){}

for(int loopy = 0; loopy < 50; loopy++)
{
x = array[4];
y = array[5];

xincr = (array[0] - x);
yincr = (array[1] - y);

array[0] = (int) (array[0] + (.08 * xincr));
array[1] = (int) (array[1] + (.08 * yincr));


x2 = array[0];
y2 = array[1];

repaint();
try
{
main.sleep(30);
}
catch(Exception q){}

/////////////////////////////////

x = array[0];
y = array[1];

xincr = (array[2] - x);
yincr = (array[3] - y);

array[2] = (int) (array[2] + (.08 * xincr));
array[3] = (int) (array[3] + (.08 * yincr));

x2 = array[2];
y2 = array[3];

repaint();
try
{
main.sleep(30);
}
catch(Exception q){}

/////////////////////////////////

x = array[2];
y = array[3];

xincr = (array[4] - x);
yincr = (array[5] - y);

array[4] = (int) (array[4] + (.08 * xincr));
array[5] = (int) (array[5] + (.08 * yincr));


x2 = array[4];
y2 = array[5];

repaint();
try
{
main.sleep(30);
}
catch(Exception q){}
}
}

public void paint(Graphics t)
{
setBackground(Color.black);
Color shade = new Color(red, green, blue);
t.setColor(shade);
t.drawLine(x, y, x2, y2);

if(red <= 250)
{
red += 5;
green += 5;
blue += 5;
}
}

public void update(Graphics t)
{
paint(t);
}
}


 

wMmm...M...mmMw on 2001-10-17 07:57 [#00042561]



yikes, heh heh. I'm sure it would... eventually become more
friendly. So if it's just basically a language, does this
mean I could type that in MY notepad and it would make
that... or do you have to have some sort of software or
something else to do it?


 

rediv i der on 2001-10-17 08:02 [#00042562]



yea, but you have to have a compiler, which is free on the
java.sun.com site. you're right, it eventually becomes a
LOT more friendly - the first time i saw code i was like
uuuuhhh. a compiler takes high-level language instructions
(like java code) and converts them into machine code
instructions (011101001010). so java code is made to be
user friendly, otherwise i'd have had to type like a zillion
zeros and ones.
i dunno if you're familiar with any dos commands, but when
you install the java compiler it adds a command called
"javac". you just javac the text file (which you save with
an extension of ".java") and it converts it into a ".class"
file (machine code). then you reference the class file from
within an html file and oila.


 

wMmm...M...mmMw on 2001-10-17 08:02 [#00042563]



That's what windows was designed for right? To make the
hostile DOS environment easier for humans (who have evolved
with eyes and spacial imaginative ways of thinking) to click
and drag visual windows and such? The only reason they'd
make androids resemble humans is so we can identify with
them more easily.


 

wMmm...M...mmMw on 2001-10-17 08:08 [#00042565]



Thanks a lot, this is all really helpful.

Later, M.


 

rediv i der on 2001-10-17 08:09 [#00042566]



you're exactly right - have you ever heard of the concept of
"chunking"? for instance, machine code is chunked into
assembly language, which is still fucking cryptic as hell.
assembly code is chunked into high-level stuff. like when
you refer to a group of ten people as "them", you've chunked
instead of explicitly listing their names off. or take
cigarettes. cigarette -> pack -> carton -> box -> transfer
truck full.

i think you have a programmer's brain. you'll probably like
these images:

http://povplace.addr.com/tips/recursion.jpg

http://www.gc.maricopa.edu/business/sylvester/cis164/catinh
at.gif

http://www.math.ubc.ca/~jbryan/

http://w1.314.telia.com/~u31414381/swamp/acrobats.jpg


 

rediv i der on 2001-10-17 08:09 [#00042567]



oh cya


 

wMmm...M...mmMw on 2001-10-17 08:22 [#00042569]



Ha ha ha, a cat in the hat fractal! That's one way to look
at it, heh heh. That first image along with some others is
in mandelbrot's "the fractal geometry of nature" book, the
one who coined the term. Scaling symmetry is all it is, but
has really interesting effects and nature seems to use it
repeatedly. Take a triangle and divide every side in thirds
and make a new triangle on the middle third. repeat repeat
etc. You know that brocoli like fractal, made of angles that
repeat on the ends of angles? Well you can make code for all
the angles to be, say 45 degrees, then gradually shrink, 44,
43, 42 etc, so the whole construction would change in a very
interesting way.

Gotsta go.


 


Messageboard index