[JAVA2D] Quadratic Bezier Curve Equation

2006-03-31 Thread Thanasis (Hotmail)
Hello to everyone, i have illustrated a quadratic bevier curve from point P1 to point P2 using a control point C. What is the equation of the quadratic curve in order to find some other points on it? Thanks in advance Thanasis

Re: [JAVA2D] Quadratic Bezier Curve Equation

2006-03-31 Thread pete
Hello Thanasis, don't really know if this belongs here... In general the equation of a (non-rational) bezier segment is b(t) = \sum_{i=0}^n b_i \cdot B_i^n( t ), b_i your n+1 control points, B_i^n the Bernstein-Polynomials of degree n, t

Re: [JAVA2D] Quadratic Bezier Curve Equation

2006-03-31 Thread Alexey Ushakov
Hello Thanasis, Here is the equation in the computer notation: x(t) = (1-t)*(1-t)*p0.x + 2*t*(1-t)*p1.x + t*t*p2.x y(t) = (1-t)*(1-t)*p0.y + 2*t*(1-t)*p1.y + t*t*p2.y p0, p1, p2 - control points Best Regards, Alexey Pete wrote: Hello Thanasis, don't really know if this belongs here...

[JAVA2D] Java font interaction with Adobe fonts

2006-03-31 Thread java2d
A while back Phil helped me figure out why certain fonts were displaying oddly (incorrect height calculation) in Java: http://forums.java.net/jive/thread.jspa?threadID=8666tstart=0 The root was that Adobe software had installed an PostScript Symbol font (SY_.PFM) into the Windows Fonts

Re: [JAVA2D] Java font interaction with Adobe fonts

2006-03-31 Thread Phil Race
You can run the app with the flag -Dsun.java2d.debugfonts=true to see which font files are accessed by 2D. But you may have a lot to wade through if the problem is that some font we expected to find is missing, as likely we will open all files. Still you may get a clue. Another approach is that

Re: [JAVA2D] Full Screen Mode on Linux

2006-03-31 Thread java2d
I am having two problems: 1) on fedora core 4, Sun's JDK 1.5 was able to at least imitate the full screen exclusive mode. Not anymore on fedora 5. (both with gnome and xfce). I tried both the current JDK 1.5 and the beta version of upcoming JDK 1.6. COuld this be a new Xorg problem? Hmm,

[JAVA2D] How to draw on the same screen from various classes

2006-03-31 Thread java2d
Though new to Java, I am creating a program using 2d graphics. The only problem I'm having is: In the main class, I defined a JFrame. Then I called my SetupCanvas class with: f.add(new SetupCanvas(c), BorderLayout.CENTER); In SetupCanvas (which extends Canvas), I draw stuff on the screen