Welcome! Log In Create A New Profile

Advanced

Assignment 2 is so cool

Posted by Anonymous User 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Anonymous User
Assignment 2 is so cool
April 25, 2006 06:42PM
This assignment is actually fun.
Re: Assignment 2 is so cool
April 25, 2006 11:01PM
glad to hear it - I'm quite stressed about it... haven't started yet :/ (still stuck on cos311 assignment (which I see you're also enrolled in))
Anonymous User
Re: Assignment 2 is so cool
April 26, 2006 05:34PM
yeah im stuck in cos311 on the Converter::Country*
thing.

Also in this assignment the vertical viewing thing might take time.
Re: Assignment 2 is so cool
April 28, 2006 08:50AM
This assignment is demoralizing smile

My PC at home crashed a couple of weeks ago, so I haven't been able to compile code. Instead, I wrote code 'blind' in a text editor. Yesterday I got my PC back and compiled my code. With the exception of typos, it compiled! Yee-haw! However ... the code does not do what I expected it to do. Not even close.

THe vertical viewing thing does seem to be the hardest part, and I'm also unsighted on how to restrict the particle tail length, but we still have about a month to get everything working.

By the way, the non-code questions for this assignment aren't that easy either, or am I just dumb?
Anonymous User
Re: Assignment 2 is so cool
April 28, 2006 12:04PM
The non code questions are way harder than question 4

as for the tail use a pointer array of type(struct) pointer.

Anonymous User
Re: Assignment 2 is so cool
April 28, 2006 07:21PM
Anyone know where to get the source code for the book?
Re: Assignment 2 is so cool
May 02, 2006 11:36AM
I've got to the point where I have a rotating cube, one particle growing in one direction only and doesn't detect collisions yet (with the cube faces), zoom works (but there are issues with clipping if you get too close), stop and start rotation works, change direction works, pop-up menu works ... getting there slowly smile

Later today I'm going to trawl the Net for repositories of openGL code snippets and I will post anything interesting I find (links).

Re the non-code questions, I have solved q1 I think. Q2 and 3 are problematic. I'm guessing the issue in q3 has to do with rounding errors and drifting from the desired results (?). Q2 I have answered the first part (is it invertible), but I'm not sure about the second part.
Anonymous User
Re: Assignment 2 is so cool
May 09, 2006 10:35AM
Do you rekon we have to test for collisions of a pyramid and cylinder for question 4b ?
Re: Assignment 2 is so cool
May 09, 2006 10:57AM
Vaughn, indeed. I haven't done that yet. Because it looks crap. The cylinder should be straightforwardish, but the pyramid is a problem.

Have you made progress on the motion callback for moving your camera? I'm thinking you're basically plotting a point on the arc of a circle. When you depress the left mouse button, you anchor your actual current eye position to the x,y position of the mouse. Then as you move it, you just adjust on the circumference of the circle you're tracing, and stop adjusting if you hit either limit or if the left mouse button is up. Make sense?
Anonymous User
Re: Assignment 2 is so cool
May 09, 2006 02:16PM
Yeah it makes sense to me but i cant draw a line with the mouse .
This line is the one to measure the angle between the 2 points.
I need to find out how to draw a line from the position of the first left click. Then when you hold down the left button an drag it, it should draw another line following from the first mouse click position.

Cant get the coordinates right.
any ideas?
Re: Assignment 2 is so cool
May 10, 2006 09:29AM
Yes, that is described at the end of chapter 3. Not sure why you want to draw lines though (??) Or do you mean invisible lines?
Anonymous User
Re: Assignment 2 is so cool
May 10, 2006 11:47AM
yeah invisible ones inorder to know the distance find the distance maybe.
Anyway i emailed the lecturer about some questions here they are.

Hi Vaughn

You wrote:
>How do you draw a line based on your mouse coordinates?
>I’ve tried using the code from the paint program but to no avail.

You must draw the whole cube based on the mouse coordinates.
Don't use the Paint program. The Rotating Cube with Virtual Trackbaal is closer to what you want.
Note that you need two mouse callback functions: MouseFunc and MotionFunc.

Use the MouseFunc callback to simply set a global boolean variable to register that the left mouse button is being held down (or not).

Use the MotionFunc button to test whether the mouse's position has moved vertically (i.e. test whether the y value has changed) and change a global variable storing the VVA accordingly. Your display callback should display the cube at the corresponding angle.

>For the change to different containers, does one need different collision tests for
>each container?

Yes. The particle should always be bound by the current container. That's why, whenever a new container is chosen, all rpevious tracing paths should be erased (because they could possibly be outside the new container) and the position should be reset to the origin (because the particle might be outside the new container).

Regards
Ken Halland


>>> vaughn preddy <vaughn_preddy@yahoo.com> 2006/05/09 14:38:48 >>>

Hello ..
I’m having a great amount of difficulty with some parts of assignment2.

Page 12 of tutorial letter 101(Vertical viewing angle)

How do you draw a line based on your mouse coordinates?
I’ve tried using the code from the paint program but to no avail.

Page 13

question 4b

For the change to different containers, does one need different collision tests for each container?

For the number of traced particles. Must the maximum number of particles be 7.
And if so must each particle move in a different randomised motion.

Thank you
Sorry, only registered users may post in this forum.

Click here to login