- #1
seacreature
- 3
- 0
help needed please.. don't need the code. but i need formula or any source that can help me. i want to try code it myself. =)
can anyone help me with this function:
// Function to be used to update the position. Given the current position,
// the direction in which the tank is looking, and the speed it is moving,
// modify position to the new position
function UpdatePosition_Axis(ref position, direction, speed)
{
*what is this asking for?*
}
// Function used to transform a point by an angle and scale, and translated by a position.
// Follows Linear Transformations: x' = p + A * x
function TransformPoint(model, position, direction, scale)
{
*and this*
}
// Function used to render a generic rectangle. It uses the position, angle, and scale to transform
// each point of the normalized rectangle model, and display the rectangle on the screen
function RenderRectangle(position, direction, scale, c)
{
*sorry, plus this*
}
Given: for part b
// Normalized Model of a rectangle.
point2d model_top_left = [-0.5, 0.5];
point2d model_top_right = [ 0.5, 0.5];
point2d model_bottom_right = [ 0.5, -0.5];
point2d model_bottom_left = [-0.5, -0.5];
help is much appreciated. thanks
can anyone help me with this function:
// Function to be used to update the position. Given the current position,
// the direction in which the tank is looking, and the speed it is moving,
// modify position to the new position
function UpdatePosition_Axis(ref position, direction, speed)
{
*what is this asking for?*
}
// Function used to transform a point by an angle and scale, and translated by a position.
// Follows Linear Transformations: x' = p + A * x
function TransformPoint(model, position, direction, scale)
{
*and this*
}
// Function used to render a generic rectangle. It uses the position, angle, and scale to transform
// each point of the normalized rectangle model, and display the rectangle on the screen
function RenderRectangle(position, direction, scale, c)
{
*sorry, plus this*
}
Given: for part b
// Normalized Model of a rectangle.
point2d model_top_left = [-0.5, 0.5];
point2d model_top_right = [ 0.5, 0.5];
point2d model_bottom_right = [ 0.5, -0.5];
point2d model_bottom_left = [-0.5, -0.5];
help is much appreciated. thanks
Last edited: