Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


bezier surface

This topic is 5717 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I would like to implement normal-calculation. This is the part that does the surface-calculation:
bezierCurve4 prev=bezierCurve4(cCurves[0].nextPoint(),cCurves[1].nextPoint(),cCurves[2].nextPoint(),cCurves[3].nextPoint(),1.0f/20.0f);	//last argument is step

while(cCurves[0].hasNext()==true && cCurves[1].hasNext()==true && cCurves[2].hasNext()==true && cCurves[3].hasNext()==true) {

bezierCurve4 stepy=bezierCurve4(cCurves[0].nextPoint(),cCurves[1].nextPoint(),cCurves[2].nextPoint(),cCurves[3].nextPoint(),1.0f/20.0f);		
	while (prev.hasNext()==true && stepy.hasNext()==true) {
			Point3 p=prev.nextPoint();
prev.reset();  //starts over

Any ideas on implementing this? Maybe one way is to calculate two vectors on each triangle, and then calculate the crossproduct? Should I specify a normal on every vertex?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!