Click here to Skip to main content
15,914,419 members
Home / Discussions / C#
   

C#

 
QuestionMessageBox Text Pin
numbers1thru913-Sep-06 4:43
numbers1thru913-Sep-06 4:43 
AnswerRe: MessageBox Text Pin
Glen Harvy13-Sep-06 4:59
Glen Harvy13-Sep-06 4:59 
QuestionCan a Math genius please help me!? [modified] Pin
srev13-Sep-06 4:26
srev13-Sep-06 4:26 
AnswerRe: Can a Math genius please help me!? Pin
papa8013-Sep-06 5:40
papa8013-Sep-06 5:40 
GeneralRe: Can a Math genius please help me!? Pin
srev13-Sep-06 6:21
srev13-Sep-06 6:21 
AnswerRe: Can a Math genius please help me!? Pin
Guffa13-Sep-06 6:49
Guffa13-Sep-06 6:49 
AnswerRe: Can a Math genius please help me!? Pin
Ed.Poore13-Sep-06 6:50
Ed.Poore13-Sep-06 6:50 
GeneralRe: Can a Math genius please help me!? Pin
srev13-Sep-06 23:43
srev13-Sep-06 23:43 
Guys,

Thanks so much for everyone's feedback. From all the feedback on this and other forums I have the answer.

The function CalcBezierValue() computes the cubic Bézier curve as the polynomial:
x = A*t^3 + 3*B*(t^2)*(1-t) + 3*C*t*(1-t)^2 + D*(1-t)^3

To use the technique in the article I need the derivative:
x' = 3*A*t^2 + 6*B*t*(1-t) - 3*B*t^2 + 3*C*(1-t)^2 - 6*C*t*(1-t) - 3*D*(1-t)^2

The final code looks like this:

// Calc the derivative value of the curve at the specified percentage (rather than the polynomial)
public float CalcBezierDerivative(float P, float A, float B, float C, float D)
{
P = 1 - P; // Reverse the normalised percentage

float tR = 3 * A * (P * P);
float tS = 6 * B * P * (1 - P);
float tT = 3 * B * (P * P);
float tU = 3 * C * ((1 - P) * (1 - P));
float tV = 6 * C * P * (1 - P);
float tW = 3 * D * ((1 - P) * (1 - P));

return tR + tS - tT + tU - tV - tW;
}

Many thanks for all your responses.

Simon
Questionwant to implement zoom operations in C# Pin
kalaveer13-Sep-06 4:23
kalaveer13-Sep-06 4:23 
AnswerRe: want to implement zoom operations in C# Pin
Nader Elshehabi13-Sep-06 7:36
Nader Elshehabi13-Sep-06 7:36 
GeneralRe: want to implement zoom operations in C# Pin
kalaveer13-Sep-06 19:11
kalaveer13-Sep-06 19:11 
GeneralRe: want to implement zoom operations in C# Pin
Nader Elshehabi14-Sep-06 1:40
Nader Elshehabi14-Sep-06 1:40 
QuestiontreeView1 = treeView2 ??? Pin
i-p-g-i13-Sep-06 4:19
i-p-g-i13-Sep-06 4:19 
AnswerRe: treeView1 = treeView2 ??? Pin
albCode13-Sep-06 4:32
albCode13-Sep-06 4:32 
GeneralRe: treeView1 = treeView2 ??? Pin
i-p-g-i13-Sep-06 4:46
i-p-g-i13-Sep-06 4:46 
GeneralRe: treeView1 = treeView2 ??? Pin
albCode13-Sep-06 4:52
albCode13-Sep-06 4:52 
GeneralRe: treeView1 = treeView2 ??? Pin
i-p-g-i13-Sep-06 5:19
i-p-g-i13-Sep-06 5:19 
GeneralRe: treeView1 = treeView2 ??? Pin
albCode13-Sep-06 5:29
albCode13-Sep-06 5:29 
QuestionRight Click File Handling Program Pin
shultas13-Sep-06 4:11
shultas13-Sep-06 4:11 
AnswerRe: Right Click File Handling Program Pin
led mike13-Sep-06 4:40
led mike13-Sep-06 4:40 
QuestionMicrophone Audio Capture Directx Pin
lgelliott13-Sep-06 4:05
lgelliott13-Sep-06 4:05 
QuestionReading Hieght and Width From Image File without opening Pin
Ach1lles13-Sep-06 3:49
Ach1lles13-Sep-06 3:49 
AnswerRe: Reading Hieght and Width From Image File without opening Pin
Nader Elshehabi13-Sep-06 7:46
Nader Elshehabi13-Sep-06 7:46 
QuestionProgrammatically Launch ClickOnce Application Pin
Brady Kelly13-Sep-06 3:29
Brady Kelly13-Sep-06 3:29 
AnswerRe: Programmatically Launch ClickOnce Application Pin
rajkumarsingh_85@yahoo.com14-May-12 21:41
rajkumarsingh_85@yahoo.com14-May-12 21:41 

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.