• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: BezierPath Madness...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BezierPath Madness...


  • Subject: Re: BezierPath Madness...
  • From: Julien Guimont <email@hidden>
  • Date: Thu, 12 Dec 2002 20:16:12 -0500

Hello,

For what I know from ADC tv, there is a huge penalty of generating bezier path with intersecting lines. It as to calculate every intersection to apply the good line jonction and not to redraw it (imagine two line crossing each other in say 30% alpha color, the intersection will be darker than the lines if you do not pay attention them).

If you can, and if it does the same printout, you can draw one after another the line segments to the view without creating a bezier. Or you can do multiple bezier with no crossing line and draw them at the end.

I'm not sure if these are the good techniques but I'd give them a try.

Bye!

Julien Guimont
Juggy Software
Monitor your connection: Ridge 2.0
www.juggysoft.com/ridge.html

Message: 13
Date: Thu, 12 Dec 2002 18:28:32 -0500
Subject: BezierPath Madness...
From: Jerry LeVan <email@hidden>
To: <email@hidden>

Hi,

I have been fiddling around with a simple program that draws pretty
geometric paths called spirolaterals. I was playing around with it and I
found that the drawing performance would "fall off the cliff" if the
generated Bezier Path had about 2500 points, ie the spinning cursor of doom
would spin anywhere from 5 to 10 seconds before the path would be drawn.

The basic algorithm was something like:

path = new bezier path
initialization
for I = 1 to repts
initialization
for j = 1 to turns
add a point to the path ( using rlinetopoint)
end for j loop
end for I loop
stroke the path

So there are about repts*turns points in the path, as I said earlier, at
some point the performance drops through the floor. ( repts=50, turns=50)

If I replace the above by:

path = new bezier path
initialization
for I = 1 to repts
initialization
for j = 1 to turns
add a point to the path ( using rlinetopoint)
end for j loop
stroke the path
empty the path
end for I loop

Performance is *much* better. (I can't make turns too large because each
turn generates a line segment one unit longer than the previous segment.)

Why would it take significantly longer to stoke a path with 2500 points as
opposed to 50 paths with 50 points?

The project can be found at http://homepage.mac.com/levanj

--Jerry
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: 2 in one
  • Next by Date: Re: NSTableView: cell frame coordinates
  • Previous by thread: Re: BezierPath Madness...
  • Next by thread: NSSlider and mouseUp event
  • Index(es):
    • Date
    • Thread