Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Circle geometry

Circle geometry

Scheduled Pinned Locked Moved Visual Basic
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cnurse
    wrote on last edited by
    #1

    Boy! I wish I paid attention in maths class instead of reading Visual Basic Programmer's Journal! (yeh right!) Can any kind soul give me a function which returns a Point object, where the point is a set number of degrees around a circle which fits inside a given rectangle. I know that's an odd way to describe it! Dim lRect As Rectangle = new Rectangle(0,0,100,100) Dim lPoint1 As Point = PointOnCircle(lRect,45) Dim lPoint2 As Point = PointOnCircle(lRect,135) The above two calls will acquire Points where the X,Y coordinates are at 45 degrees around the circle (which fits in a rectangle of 100,100) and 135 degrees respectively. The bit that gets me is the X= some sin/cos nonsense and Y= the other bit (and those bl**dy radians are involved aren't they). Maybe I did keep one eye on the blackboard. I would be prepared to have your babies if you can pull this one off for me (which I am just sure you are dying to know how I will manage that!). Thanks! Ps: Sorry for all the !!! in here, well it is New Year and all that!! oops! damn! can't stop it! Nursey

    C 1 Reply Last reply
    0
    • C cnurse

      Boy! I wish I paid attention in maths class instead of reading Visual Basic Programmer's Journal! (yeh right!) Can any kind soul give me a function which returns a Point object, where the point is a set number of degrees around a circle which fits inside a given rectangle. I know that's an odd way to describe it! Dim lRect As Rectangle = new Rectangle(0,0,100,100) Dim lPoint1 As Point = PointOnCircle(lRect,45) Dim lPoint2 As Point = PointOnCircle(lRect,135) The above two calls will acquire Points where the X,Y coordinates are at 45 degrees around the circle (which fits in a rectangle of 100,100) and 135 degrees respectively. The bit that gets me is the X= some sin/cos nonsense and Y= the other bit (and those bl**dy radians are involved aren't they). Maybe I did keep one eye on the blackboard. I would be prepared to have your babies if you can pull this one off for me (which I am just sure you are dying to know how I will manage that!). Thanks! Ps: Sorry for all the !!! in here, well it is New Year and all that!! oops! damn! can't stop it! Nursey

      C Offline
      C Offline
      cnurse
      wrote on last edited by
      #2

      Jeez you guys must be peeing laughing at my math abilities 8-) I found this website for nuclear physics (OK its an explanation of trig for 2 year olds) http://www.updatestage.com/previous/991001.html If anybody would like the code for building a polygon of any number of sides that fits in a specified box/circle, then let me know. Nursey

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups