sar22
03-23-2002, 11:17 PM
Hi everyone
i am working on a project where i have to create a 7 layered tree. the problem i am having is that either i can shrink the line (the trunk of the tree) or i can rotate it. but i can't do both. even if it rotates, it doesn't rotate at the proper angle. and it doesn't have to do with the angle i specify.
i am using the glrotatef and gltranslatef functions.
the procedure i am following:
-initialize the two points to draw the first line.(the trunk)
-shrink the line(for branch) and create new coordinates and draw smaller line
-translate the smaller line back to the origin to rotate
-rotate the line
-translate back to it's original position so it loooks like the branch of the tree.
i appreciate any feedback on this...thanks in advance.
i am working on a project where i have to create a 7 layered tree. the problem i am having is that either i can shrink the line (the trunk of the tree) or i can rotate it. but i can't do both. even if it rotates, it doesn't rotate at the proper angle. and it doesn't have to do with the angle i specify.
i am using the glrotatef and gltranslatef functions.
the procedure i am following:
-initialize the two points to draw the first line.(the trunk)
-shrink the line(for branch) and create new coordinates and draw smaller line
-translate the smaller line back to the origin to rotate
-rotate the line
-translate back to it's original position so it loooks like the branch of the tree.
i appreciate any feedback on this...thanks in advance.