Page 2 of 5 [ 46 posts ] Go to page Previous  1, 2, 3, 4, 5  Next

#### I Don't Watch 3D Fund, But....

 Print view Previous topic | Next topic

#### I Don't Watch 3D Fund, But....

Author Message
 Post subject: Re: I Don't Watch 3D Fund, But....  Posted: December 9th, 2017, 4:04 pm
Well, I Was testing the same code as chili and it did not work, and I don't think that's why.
I could be wrong, so I'll give it a try.

 Post subject: Re: I Don't Watch 3D Fund, But....  Posted: December 9th, 2017, 6:57 pm

Joined: February 28th, 2013, 3:23 am
Posts: 2970
Location: Oklahoma, United States
Ok, I might see the problem, slope ( m ) and intercept ( b ) should be float, not int which also means dx and dy should be float so you don't lose the fraction part of the division result. Don't just cast the result, you need to make dx and dy floats.

Code:
void DrawLine(int x1, int y1, int x2, int y2, Color c)
{
float dx = static_cast<float>( x2 - x1 );
float dy = static_cast<float>( y2 - y1 );
float m = dy / dx;
float b = y1 - m*x1;
for (int x = x1; x <= x2; x++)
{
int y = m*x + b;
PutPixel(x, y, c);
}
}

_________________
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

 Post subject: Re: I Don't Watch 3D Fund, But....  Posted: December 9th, 2017, 11:04 pm
Thanks I’ll try

 Post subject: Re: I Don't Watch 3D Fund, But....  Posted: December 10th, 2017, 12:41 am
What the Heck!?!??!!? I can only draw a horizontal line!!!!!

Last edited by goldengamesTM on December 12th, 2017, 2:29 pm, edited 2 times in total.

 Post subject: Re: I Don't Watch 3D Fund, But....  Posted: December 11th, 2017, 3:45 pm

Joined: December 11th, 2017, 3:29 pm
Posts: 22
Location: recurring
You should just watch his videos. All of them. Five times.
1. 100% speed and take notes
2. 100% speed and use pause to follow in your own VS studio
3. 50% speed, paying attention to whatever you didn't fully get last time
4. 100% speed with your eyes closed and hand on your joystick
5. 200% speed

These are the rituals of the pure and true Chili Minion.

_________________
The greatest joy a man can know is to conquer his enemies & drive them before him.
To ride their horses & take away their possessions. To see faces of those who were dear
bedewed with tears & clasp their wives & daughters to his arms.

 Post subject: Re: I Don't Watch 3D Fund, But....  Posted: December 11th, 2017, 6:51 pm
Thank You, But I Can't Watch Any Chili Vids Except Old Ones. ( No 3D Fund, Or Normal Tutorials From Beginner No.0 And On)

Last edited by goldengamesTM on December 12th, 2017, 2:32 pm, edited 3 times in total.

 Post subject: Re: I Don't Watch 3D Fund, But....  Posted: December 12th, 2017, 12:02 am

Joined: June 26th, 2012, 5:38 pm
Posts: 767
Location: USA
I think you should reconsider watching chillis videos. However, if you don't want to do that, I recommend uploading a ziped solution for your project to get help.

P.S. I recommend being more respectful as people will be less likely to help if you swear at them when they give you a solution you don't want.

_________________
Computer too slow? Consider running a VM on your toaster.

 Post subject: Re: I Don't Watch 3D Fund, But....  Posted: December 12th, 2017, 1:15 am

Joined: December 31st, 2011, 4:53 pm
Posts: 3538
Location: Japan
P.P.S. I recommend being more respectful to people, especially people like DicheBach. I mean, have you seen the dude's signature? That's some Robert E. Howard shit right there.

_________________
Chili

 Post subject: Re: I Don't Watch 3D Fund, But....  Posted: December 13th, 2017, 2:40 pm

Joined: December 11th, 2017, 3:29 pm
Posts: 22
Location: recurring
In the name of Crom and his Archangel Chili of the C++ . . .

_________________
The greatest joy a man can know is to conquer his enemies & drive them before him.
To ride their horses & take away their possessions. To see faces of those who were dear
bedewed with tears & clasp their wives & daughters to his arms.

 Post subject: Re: I Don't Watch 3D Fund, But....  Posted: December 14th, 2017, 6:34 am
Ok, So I Have The Triangles, I Have The Wireframe, But Now I Need To Learn How To Fill The Triangles. I Want To Fill Them One Of 2 Ways:
1. I Want To Keep Drawing Triangles Of Slightly Smaller Dimensions Each Time
2. I Can Make Lines That Fill Up The Triangle And Get Smaller Each Time
But, There's A Problem, I Don't Know How To Detect The Edges Of The Triangle...

Display posts from previous:  Sort by

 Page 2 of 5 [ 46 posts ] Go to page Previous  1, 2, 3, 4, 5  Next

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

 Search for: