Click here to Skip to main content
15,902,276 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: 3D Model for game Pin
AmitDey23-Sep-08 22:17
AmitDey23-Sep-08 22:17 
Questioncan someone help me in designing my MDi or my mainform.. Pin
cutedrew20-Sep-08 22:52
cutedrew20-Sep-08 22:52 
AnswerRe: can someone help me in designing my MDi or my mainform.. Pin
Smithers-Jones24-Sep-08 0:32
Smithers-Jones24-Sep-08 0:32 
QuestionParticle Deposition Pin
Neil Ramirez17-Sep-08 16:39
Neil Ramirez17-Sep-08 16:39 
Questionbrush problem in c#... Pin
Sajjad Izadi17-Sep-08 8:13
Sajjad Izadi17-Sep-08 8:13 
AnswerRe: brush problem in c#... Pin
oobimoo17-Sep-08 8:32
oobimoo17-Sep-08 8:32 
AnswerRe: brush problem in c#... Pin
Syed Mehroz Alam17-Sep-08 15:48
Syed Mehroz Alam17-Sep-08 15:48 
AnswerRe: brush problem in c#... Pin
Dan17-Sep-08 19:16
Dan17-Sep-08 19:16 
The best way to handle this situation is to use an interpolation function to create a curve that smoothly joins the input points of the mouse.
The easiest pseudo sample is below, but you can expand it to use bicubic or any spline function.

void DrawPoint( double x, double y )
{
     ...paint single brush dab.
}

void DrawLine( double x0, double y0, double x1, double y1, double spacing )
{
	// get delta
	double dx = x1-x0;
	double dy = y1-y0;
	
	// Get length
	double dist = sqrt( dx * dx + dy * dy );

	// Normalize
	dx *= 1.0 / dist;
	dy *= 1.0 / dist;

	// Travel down the line ( x0, y0 ) ( x1, y1 )
	for ( double p = spacing; p <= dist; p+= spacing ) {
		// Draw a single point at spacing pixels apart.
		double px = x0 + p * dx;
		double py = y0 + p * dy;
		DrawPoint( px, py );
	}
}

void MyPaintCode( )
{
	for ( int i = 0; i < NumberofPoints; i++ ) {
                // Draw lines between input points with 1 pixel spacing.
		PaintLine( Input_x[ i ], Input_y[ i ], 1.0 );
	}
}

QuestionCapture Video Pin
Harvey Saayman17-Sep-08 6:18
Harvey Saayman17-Sep-08 6:18 
AnswerRe: Capture Video Pin
Tim Craig17-Sep-08 14:03
Tim Craig17-Sep-08 14:03 
AnswerRe: Capture Video Pin
Dave Kreskowiak17-Sep-08 17:14
mveDave Kreskowiak17-Sep-08 17:14 
GeneralRe: High Quality Real Vista Icons Pin
Dave Kreskowiak17-Sep-08 17:13
mveDave Kreskowiak17-Sep-08 17:13 
QuestionglReadPixels problem Pin
Tomas(cz)15-Sep-08 21:39
Tomas(cz)15-Sep-08 21:39 
AnswerRe: glReadPixels problem Pin
Steve Echols17-Sep-08 19:56
Steve Echols17-Sep-08 19:56 
QuestionShoemake's Mysterious Translation Controller [modified] Pin
Steve Katic14-Sep-08 13:07
Steve Katic14-Sep-08 13:07 
Answer[Message Deleted] Pin
Steve Katic14-Sep-08 13:35
Steve Katic14-Sep-08 13:35 
GeneralRe: Shoemake's Mysterious Translation Controller (Take Two) Pin
Tim Craig14-Sep-08 14:34
Tim Craig14-Sep-08 14:34 
GeneralRe: Shoemake's Mysterious Translation Controller (Take Two) Pin
Steve Katic14-Sep-08 14:55
Steve Katic14-Sep-08 14:55 
GeneralRe: Shoemake's Mysterious Translation Controller (Take Two) [modified] Pin
Steve Katic14-Sep-08 15:13
Steve Katic14-Sep-08 15:13 
QuestionCreate real time graphical line chart from data save in txt file format Pin
yefeng_law13-Sep-08 6:52
yefeng_law13-Sep-08 6:52 
AnswerRe: Create real time graphical line chart from data save in txt file format Pin
Tim Craig13-Sep-08 12:03
Tim Craig13-Sep-08 12:03 
GeneralRe: Create real time graphical line chart from data save in txt file format Pin
yefeng_law20-Sep-08 7:15
yefeng_law20-Sep-08 7:15 
GeneralRe: Create real time graphical line chart from data save in txt file format Pin
Tim Craig21-Sep-08 18:25
Tim Craig21-Sep-08 18:25 
QuestionStrange error capturing the desktop to a bitmap Pin
rikshot13-Sep-08 5:48
rikshot13-Sep-08 5:48 
AnswerRe: Strange error capturing the desktop to a bitmap Pin
Mark Salsbery13-Sep-08 9:05
Mark Salsbery13-Sep-08 9:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.