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

Re: Adding some polar coordinate capabilities to NSBezierPath.


  • Subject: Re: Adding some polar coordinate capabilities to NSBezierPath.
  • From: "Marco Scheurer" <email@hidden>
  • Date: Mon, 15 Oct 2001 16:10:51 +0200

On Mon, 15 Oct 2001 06:11:45 -0700
"John C. Randolph" <email@hidden> wrote:
> 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;
>
> Should the naming lean more toward English, or Geometry?

In that case, I would say english. Rho and theta to express
polar coordinates is not universal, certainly less so than x
and y for cartesian. For instance, I've used (r, theta) much
more often than (rho, theta).

Is it possible to split rotation and movement? That would
make the names easier:

- (void) turnByAngle:(float) angle;
- (void) turnToDirection:(float) angle;
- (void) moveToDistance:(float) distance;

marco

Marco Scheurer
Sen:te, Lausanne, Switzerland http://www.sente.ch


References: 
 >Adding some polar coordinate capabilities to NSBezierPath. (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Adding some polar coordinate capabilities to NSBezierPath.
  • Next by Date: Re: Little problem with NSFormatter way of working
  • Previous by thread: Adding some polar coordinate capabilities to NSBezierPath.
  • Next by thread: Re: Adding some polar coordinate capabilities to NSBezierPath.
  • Index(es):
    • Date
    • Thread