Linuxtrent: Re: Curve di Bezier

  • From: Daniele Nicolodi <daniele@xxxxxxxxxx>
  • To: linuxtrent@xxxxxxxxxxxxx
  • Date: Sun, 9 Sep 2001 22:06:36 +0200

On Sun, Sep 09, 2001 at 08:15:16PM +0200, Daniele Nicolodi wrote:

> Io ho trovato questo:
> http://www.icce.rug.nl/erikjan/bluefuzz/beziers/beziers/node2.html
> ma il risultato che si ottiene con l'algoritmo proposto non mi sembra
> essere quello corretto (confrontando quanto ottenuto con quanto 
> ottenuto con un altro software il risultato e` leggermente diverso).

L'algoritmo e` giusto (ho studiato un po') ero io che sbagliavo.
Invece che scrivere:

          x31 = cx + 2/3 * (x1 - cx);
          y31 = cy + 2/3 * (y1 - cy);
          x32 = x1 + 1/3 * (x - x1);
          y32 = y1 + 1/3 * (y - y1);

forse e` meglio:

          x31 = cx + (x1 - cx) * 2 / 3;
          y31 = cy + (y1 - cy) * 2 / 3;
          x32 = x1 + (x - x1) / 3;
          y32 = y1 + (y - y1) / 3;
          
potrebbe non sembrare ma la differenza si nota eccome.

Ciao

PS: molto bello se interessa l'argomento
    http://graphics.cs.ucdavis.edu/CAGDNotes/
-- 
Daniele
                    --- http://www.grinta.net ---
-- 
Per iscriversi  (o disiscriversi), basta spedire un  messaggio con SOGGETTO
"subscribe" (o "unsubscribe") a mailto:linuxtrent-request@xxxxxxxxxxxxxxxxx


Other related posts: