Click here to Skip to main content
15,920,687 members
Home / Discussions / C#
   

C#

 
QuestionDealing with Controls/ Copy it to a new tabControl Pin
Sueberl16-Feb-10 9:54
Sueberl16-Feb-10 9:54 
AnswerRe: Dealing with Controls/ Copy it to a new tabControl Pin
Luc Pattyn16-Feb-10 10:22
sitebuilderLuc Pattyn16-Feb-10 10:22 
GeneralRe: Dealing with Controls/ Copy it to a new tabControl Pin
Sueberl16-Feb-10 10:33
Sueberl16-Feb-10 10:33 
GeneralRe: Dealing with Controls/ Copy it to a new tabControl Pin
hammerstein0516-Feb-10 11:32
hammerstein0516-Feb-10 11:32 
GeneralRe: Dealing with Controls/ Copy it to a new tabControl Pin
Luc Pattyn16-Feb-10 13:53
sitebuilderLuc Pattyn16-Feb-10 13:53 
GeneralRe: Dealing with Controls/ Copy it to a new tabControl Pin
Sueberl17-Feb-10 1:00
Sueberl17-Feb-10 1:00 
GeneralRe: Dealing with Controls/ Copy it to a new tabControl Pin
Luc Pattyn17-Feb-10 1:05
sitebuilderLuc Pattyn17-Feb-10 1:05 
QuestionQuadtree Implementation Pin
MagicalC4Wombat16-Feb-10 9:45
MagicalC4Wombat16-Feb-10 9:45 
Hi,

I'm new to the C language, but I am taking a course in it. My class has a project that I am having some trouble with. If anyone can give me some code to reference, a source code, or just point me in the right direction, it would be greatly appreciated.

Here is the assignment:

Create a simulation of 100 squares, each 16x16 pixels wide. Each square is initially white in color. Each square should be given a random position on screen, and a random initial velocity of between 0 and 5 pixels per clock tick in both x and y axes (i.e., x and y velocity can be different from each other). Square positions are updated every clock tick.

When squares collide, they change color to red, and remain red until they finish colliding. When a square no longer is intersecting another square, it reverts back to white.

A quadtree data structure of at least depth 4 must be part of the implementation of collision detection. Square position updates must result in updates to the quadtree, rather than a complete recomputation of the quadtree. It is unacceptable to regenerate the quadtree in each clock tick.

When a square hits the edge of the window, it should "bounce", and thereby stay in the visible part of the playfield.

Use of the GOTO statement outside of case statement blocks is forbidden.
_______


I reiterate, I know very little about C, so I even need help drawing the squares. Anything you can do to help, I really appreciate it. I will (obviously) credit whomever sends me reference/source code.

Thanks in advance
-Magy
AnswerRe: Quadtree Implementation Pin
Luc Pattyn16-Feb-10 9:58
sitebuilderLuc Pattyn16-Feb-10 9:58 
GeneralRe: Quadtree Implementation Pin
MagicalC4Wombat16-Feb-10 10:06
MagicalC4Wombat16-Feb-10 10:06 
GeneralRe: Quadtree Implementation Pin
Luc Pattyn16-Feb-10 10:13
sitebuilderLuc Pattyn16-Feb-10 10:13 
AnswerRe: Quadtree Implementation Pin
harold aptroot16-Feb-10 10:14
harold aptroot16-Feb-10 10:14 
Questionassociating a file with a .EXE on a cd Pin
shadowthief_0316-Feb-10 8:55
shadowthief_0316-Feb-10 8:55 
AnswerRe: associating a file with a .EXE on a cd Pin
Luc Pattyn16-Feb-10 9:11
sitebuilderLuc Pattyn16-Feb-10 9:11 
GeneralRe: associating a file with a .EXE on a cd Pin
shadowthief_0316-Feb-10 11:01
shadowthief_0316-Feb-10 11:01 
GeneralRe: associating a file with a .EXE on a cd Pin
hammerstein0516-Feb-10 11:36
hammerstein0516-Feb-10 11:36 
GeneralRe: associating a file with a .EXE on a cd Pin
shadowthief_0316-Feb-10 12:09
shadowthief_0316-Feb-10 12:09 
QuestionWindows service Pin
aurelcly16-Feb-10 8:26
aurelcly16-Feb-10 8:26 
AnswerRe: Windows service Pin
Dimitri Witkowski16-Feb-10 9:03
Dimitri Witkowski16-Feb-10 9:03 
AnswerRe: Windows service Pin
Calla16-Feb-10 19:53
Calla16-Feb-10 19:53 
AnswerRe: Windows service Pin
Mouldiwarp17-Feb-10 3:03
Mouldiwarp17-Feb-10 3:03 
Questionxml Pin
naghoumeh1416-Feb-10 6:09
naghoumeh1416-Feb-10 6:09 
AnswerRe: xml Pin
dan!sh 16-Feb-10 6:35
professional dan!sh 16-Feb-10 6:35 
AnswerRe: xml Pin
Not Active16-Feb-10 6:37
mentorNot Active16-Feb-10 6:37 
GeneralRe: xml Pin
naghoumeh1416-Feb-10 12:09
naghoumeh1416-Feb-10 12:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.