• 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
Adding some polar coordinate capabilities to NSBezierPath.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adding some polar coordinate capabilities to NSBezierPath.


  • Subject: Adding some polar coordinate capabilities to NSBezierPath.
  • From: "John C. Randolph" <email@hidden>
  • Date: Mon, 15 Oct 2001 06:11:45 -0700

After attending a lecture by Dan Ingalls last week, I was somewhat intrigued by the classic turtle-graphics figures that the smalltalkers used to do for demos. The upshot is, I'm writing a category on NSBezierPath, like this:

@interface NSBezierPath (turtleGraphicsAdditions)

- (void) moveWithHeading:(float) angle distance:(float) distance;
- (void) lineWithHeading:(float) angle distance:(float) distance;

@end

..but I'm not entirely happy with these method names. I've considered making it

- (void) relativeMoveToRho:(float) rho theta:(float) theta;
- (void) relativeLineToRho:(float) rho theta:(float) theta;

where rho and theta are a polar offset from the path's current point, and adding

- (void) moveToRho:(float) rho theta:(float) theta;
- (void) lineToRho:(float) rho theta:(float) theta;

where rho and theta are a polar offset from the origin.

This code will end up in the MiscKit, so I thought I'd solicit the group's opinion. Should the naming lean more toward English, or Geometry?

-jcr



"I fear all we have done is to awaken a sleeping giant and fill him with a terrible resolve." -Admiral Isoroku Yamamoto, Dec 7, 1941.


  • Follow-Ups:
    • Re: Adding some polar coordinate capabilities to NSBezierPath.
      • From: "John C. Randolph" <email@hidden>
    • Re: Adding some polar coordinate capabilities to NSBezierPath.
      • From: "Erik M. Buck" <email@hidden>
    • Re: Adding some polar coordinate capabilities to NSBezierPath.
      • From: "Marco Scheurer" <email@hidden>
  • Prev by Date: Zooming in/out of images
  • Next by Date: Re: Adding some polar coordinate capabilities to NSBezierPath.
  • Previous by thread: Re: Zooming in/out of images
  • Next by thread: Re: Adding some polar coordinate capabilities to NSBezierPath.
  • Index(es):
    • Date
    • Thread