I'll give it a try. Visual Logic, sadly, is not a real programming language. It uses the logic behind the higher languages, (If, for, while, do while, assignment, procedures, etc) without requiring actual coding. Its a great tool for learning the logic behind coding, but it lacks a lot of instructive content which is direly needed (you hearing me Visual Logic!!!!?????) Anyone else have a solution?
Any Visual Logic students out there that have been fighting with the same issue?
Just to refresh: I need to be able to randomize the generation of graphics within all four quadrants of the X,Y grid and thus far I have only been able to get it to work in one of the four quadrants at a time. Furthermore, after some more putzing around I was able to come up with this. call procedures are in brackets
input sides
input Build
for 1 to Build step 1
Move to: X: random(100) - 100
Y: random(100) + 100
[BuildShape(Build)]
Move to: X: random(100) + 100
Y: random(100) + 100
[BuildShape(Build)]
Move to: X: random(100) + 100
Y: random(100) - 100
[BuildShape(Build)]
Move to: X: random(100) - 100
Y: random(100) - 100
[BuildShape(Build)]
end for
and the [BuildShape(Build) procedure would roughly look like this
[BuildShape(sides)] Argument: sides = Build1 (Sets Build1 = to the Input sides outside of procedure)
for 1 to Build1
pen color : Pink
Forward: 50
Turn Right: 360 / Build1
end for
For 3, 4, 5 the shapes produced will be pink and a triangle, a square, and a pentagon. I know what I'm doing, I just can't figure out this DUMB [bleep] part about randomization. I'm a lil tipsy, been at work for twelve hours, and i just want this to be done.
Now that will build four shapes in the four quadrants (possibly) but it still is not completely random because procedure [BuildShape] is limited to the location set by the move to.
Again, let me reiterate: I know I am PROBABLY going to be using this on my final project BUTTT BUTT BUTTTT!!!!!: I have yet to receive my project so this question is not based on any specific problem I have received for homework or class work.
Note: If you look down the forum list there is a paycheck problem that is necro and no one replied to it. I didn't reply either but I was really bored so I opened up VL and went to work a total of 3.5 minutes and I solved the problem. Taxes on 400 dollars at 15% is 60 dollars, not 45. It required three inputs, one assignment, an if, and a nested if statement, and one output. Only had one error and that was because I didn't have enough white space. Silly beginners. If people take five minutes to work on a problem they will see that the solution is soooo easy.
unless of course you are trying to figure out the randomization of X, Y coordinates.
Edited by ThisisDandy, 14 November 2010 - 03:26 AM.