| | |
Parallel Lines Illusions: Very Tricky!!!
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Okay, if I could, I would shoot my CS teacher, and then shoot myself.
Reality check. Done.
Anyways, check out this yucky program right here...I don't even know where to begin...we need to create a new drawing pad; and by using two methods, we would have to create this illusion image by using only parallel lines and shaded "rectangles". Here's the link to the assignment, since I can't copy or save his files:
Click on Assignment dated 10/25/04, practice with For Loops
Username: cs2
password: 89106
I know I'm asking you guys to go through alot, but I really need help on this. This is a challenging program, and most of the older kids in my class are having BIG trouble solving this assignment...
I'm going to work on it now and see what stuff I can come up with. But please, if you got spare time, take a quick look at the program and see if you can help. Thanks ALOT!!!
Reality check. Done.
Anyways, check out this yucky program right here...I don't even know where to begin...we need to create a new drawing pad; and by using two methods, we would have to create this illusion image by using only parallel lines and shaded "rectangles". Here's the link to the assignment, since I can't copy or save his files:
Click on Assignment dated 10/25/04, practice with For Loops
Username: cs2
password: 89106
I know I'm asking you guys to go through alot, but I really need help on this. This is a challenging program, and most of the older kids in my class are having BIG trouble solving this assignment...
I'm going to work on it now and see what stuff I can come up with. But please, if you got spare time, take a quick look at the program and see if you can help. Thanks ALOT!!!
•
•
Join Date: Mar 2004
Posts: 765
Reputation:
Solved Threads: 38
Given the date of the assignment, I think I can assume that it's already been due so I suppose I could try and answer it.
I kind of mixed basic and c++ code structures, but I think something like this would work. The only slightly tedious part is the row's offset. It's just nested loops, nothing really tricky here.
As for the circles, I don't know what its suppose to look like.
I kind of mixed basic and c++ code structures, but I think something like this would work. The only slightly tedious part is the row's offset. It's just nested loops, nothing really tricky here.
Java Syntax (Toggle Plain Text)
offset = 0 flag = 0 for y = 0 to 7 for x = 0 to 13 step 2 pen.setPosition(x*40 + offset,y*40) pen.fillRect(40,40) pen.setPosition(0 ,(y+1)*40) pen.drawLine(0,endOfScreen) next x //determine whether to increase or decrease the offset of the row //offsets by 3 each time if flag = 0 and offset = 6 { flag = 1 } if flag = 1 and offset = 0 { flag = 0 } if flag = 0 then offset += 3 if flag = 1 then offset -= 3 next y
As for the circles, I don't know what its suppose to look like.
![]() |
Similar Threads
- Question of the day (Geeks' Lounge)
- worse case scenario (new mobo but bad everything?) (Troubleshooting Dead Machines)
- What do you play on your pc? (Geeks' Lounge)
- Why do people wish for tableless with CSS? (HTML and CSS)
- newbee (Visual Basic 4 / 5 / 6)
- Dilettante Alert (Community Introductions)
- help with extra credit lab (C++)
Other Threads in the Java Forum
- Previous Thread: Borders
- Next Thread: JBuilder Gui textArea Help!
| Thread Tools | Search this Thread |
911 addball addressbook android api append applet application array arrays automation binary bluetooth button character chat class classes client code component css csv database eclipse ee error event exception fractal ftp game givemetehcodez graphics gui html ide image input integer j2me japplet java javaarraylist javaprojects jmf jni jpanel julia jvm key linked linux list loan loop map method methods mobile netbeans newbie objects oriented output panel phone print printf problem program programming project projects recursion replaydirector reporting researchinmotion robot rotatetext scanner screen se server service set size sms software sort sql string swing test threads time transfer tree ubuntu windows





