Question:
Mathematica:Forming letter "Z"(times newroman) by Bezier curves?
2007-01-18 12:15:23 UTC
Mathematica:Forming letter "Z"(times newroman) by Bezier curves?
Construct a full Mathematica program(when i press shift+enter Z appear as out) that constitutes, forms the letter "Z"(timesnewroman) by using Bezier curves...
Three answers:
2007-01-20 14:14:54 UTC
here is some information that might help you write your own code:





In the mathematical field of numerical analysis, a Bézier curve is a parametric curve important in computer graphics. Generalizations of Bézier curves to higher dimensions are called Bézier surfaces, of which the Bézier triangle is a special case.



Bézier curves were widely publicised in 1962 by the French engineer Pierre Bézier, who used them to design automobile bodies. The curves were first developed in 1959 by Paul de Casteljau using de Casteljau's algorithm, a numerically stable method to evaluate Bézier curves.



/*

Code to generate a cubic Bezier curve

*/



typedef struct

{

float x;

float y;

}

Point2D;



/*

cp is a 4 element array where:

cp[0] is the starting point, or P0 in the above diagram

cp[1] is the first control point, or P1 in the above diagram

cp[2] is the second control point, or P2 in the above diagram

cp[3] is the end point, or P3 in the above diagram

t is the parameter value, 0 <= t <= 1

*/



Point2D PointOnCubicBezier( Point2D* cp, float t )

{

float ax, bx, cx;

float ay, by, cy;

float tSquared, tCubed;

Point2D result;



/* calculate the polynomial coefficients */



cx = 3.0 * (cp[1].x - cp[0].x);

bx = 3.0 * (cp[2].x - cp[1].x) - cx;

ax = cp[3].x - cp[0].x - cx - bx;



cy = 3.0 * (cp[1].y - cp[0].y);

by = 3.0 * (cp[2].y - cp[1].y) - cy;

ay = cp[3].y - cp[0].y - cy - by;



/* calculate the curve point at parameter value t */



tSquared = t * t;

tCubed = tSquared * t;



result.x = (ax * tCubed) + (bx * tSquared) + (cx * t) + cp[0].x;

result.y = (ay * tCubed) + (by * tSquared) + (cy * t) + cp[0].y;



return result;

}



/*

ComputeBezier fills an array of Point2D structs with the curve

points generated from the control points cp. Caller must

allocate sufficient memory for the result, which is



*/



void ComputeBezier( Point2D* cp, int numberOfPoints, Point2D* curve ) {

float dt;

int i;



dt = 1.0 / ( numberOfPoints - 1 );



for( i = 0; i < numberOfPoints; i++)

curve[i] = PointOnCubicBezier( cp, i*dt );

}

.
MamaMia ©
2007-01-18 12:30:55 UTC
I don't think this is the right place to have someone construct an entire, specific software program for you, even if it is math related. You should at least attempt it yourself, and post your coding attempts if you are having difficulties.
ishman
2016-10-15 14:08:21 UTC
convinced and also C cup bra length might want to easily be pertaining to ok cup or S cup which does no longer make experience because D cup, E ( DD cup), F( DDD cup ), G cup, H cup and that i cup is higher than C cup. also a C in record playing cards might want to be called ok or S which does no longer make experience because a D and F is worse than a C.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...