advertisement

Article:
  Introduction to Cocoa Graphics, Part 2
Subject:   changed one line of code for info
Date:   2001-11-19 21:36:51
From:   psheldon
Response to: what is this thing called triangle?

We saw triangle was of class you investigated, NSBezierpath class and not Bezier class. Sorry, my memory became lazy. Must have precise memories as computers are unforgiving.
;-)
Info (in subject line), as defined by AI guys is surprise (for me sometimes extreme confusion).
Commented out line with method curveToPoint to put in your investigated method, appendBezierPathWithArcFromPoint. I checked on radius, not an integer but rather a float, which with hindsight makes sense on a raster because a hypotenuse is irrational and I might like to turn that triangle with Bezier bent bottom into an Apple pie (forgive the pun).
I didn't figure the hypothenuse of 200 and 100 right triangle, but grew impatient and made a radius 200.0 to type match, taking no chances to find this alleged bug.
I got a triangle not a pie. Oh, maybe your method didn't do anything and closePath did.
I commented out closePath.
I lost the red and green strokes on bottom but got a triangle fill. Plausibly fills should spill all over if they are to open objects, that's the way quickdraw opcodes work.
Now, I doubt Apple again. Which way is this float pointing? Was the pie to curve in or out? Tried with and without closePath and got a straight triangle fill.
Note:
My search space is doubling because I don't have one bit facts:
1.What is this closePath doing when the triangle fill is straight, do we have a triangle or don't we.
2. What difference, if any, does sign of radius float make. How do I specify which way the arc curves to make an Apple pie or Apple dent.
When my puzzlement increases like this, I need to give things a rest to get a heuristic in the search, otherwise I keep doubling up things to try and fill up my "chess board" with more than the grains of wheat or sand in the world, however that story goes.


A heuristic comes to me in a morning vision when thinking out of the box.


Gotta get a good nights sleep and then back at it!


Sorry, that's the way my brain works and I am quite happily unemployed. So far it looks like appendBezierPathWithArcFromPoint is also not working.
;-)


1 to 2 of 2
  1. no morning vision heuristic, ;-(
    2001-11-20 09:29:58  psheldon [View]

  2. thinking in box, curve out of box ;-)
    2001-11-19 22:42:06  psheldon [View]

    • first sample code and story
      2001-11-21 09:54:45  psheldon [View]

      • tool for fluted ends of fonts, serifs (?)
        2001-11-21 12:29:22  psheldon [View]

    • happy you figured it out
      2001-11-20 22:29:03  psheldon [View]

      • The plot thickens!
        2001-11-21 06:40:57  retro [View]

        • The plot thickens! So does the fluted R.
          2001-11-21 14:20:42  psheldon [View]

      • Absolutely
        2001-11-21 05:34:53  retro [View]

        • Absolutely --- ah I see two tangential
          2001-11-21 14:52:20  psheldon [View]

    • I figured it out!
      2001-11-20 21:22:43  retro [View]

    • Thanks...
      2001-11-20 12:09:30  retro [View]

1 to 2 of 2