Re: NEW EVIDENCE: Circle Method has a problem!!

From: Randy Gardner (RandyGardner_at_discussions.microsoft.com)
Date: 01/29/05


Date: Sat, 29 Jan 2005 09:29:02 -0800

You hit on my original request which is how do I get a solution to the problem?
Thanks to Randy B. there does appear to be a work around which I appreciate!

My first goal was to get support for the problem which I can now prove
conclusively
with the new code: included if your interested.

Second, how do I get Microsoft's attention to the problem and a patch??

Thanks,

Randy

NEW FORM1_LOAD code
'
'
'
Form1.WindowState = 2
Picture1.BackColor = vbWhite
Picture1.AutoRedraw = vbTrue
'
' Set Height unequal to Width, IF EQUAL NO PROBLEM!!!!!!
Picture1.Height = 11000
Picture1.Width = 14000
'
'
' Set Coordinate (0,0) in the center of the picture box.
'
Picture1.ScaleWidth = 130
'
Picture1.ScaleHeight = (Picture1.ScaleWidth / 2) * (Picture1.Height /
Picture1.Width)
'
Picture1.Scale ((Picture1.ScaleWidth * -1) / 2,
Picture1.ScaleHeight)-(Picture1.ScaleWidth / 2, Picture1.ScaleHeight * -1)
'
' Draw Axis at (o,o)
'
Picture1.Line (1 * -1, 0)-(1, 0), vbBlack
Picture1.Line (0, 1)-(0, 1 * -1), vbBlack
'
'

'
END FORM1

NEW COMMAND1_Click code:
'
' THE PROBLEM IS AGREVATED BY LARGE DIAMETERS (Try : R! = 50, 100, 500)
' and the ERROR only exist in the Y direction.
'
' When the center of the circle is placed the radius distance from the
origin on the
' axis the circumference should go through (0,0)
'
' Moves center of circle around the axis (R!, 0); (-R!, 0); (0, R!); (0,
-R!)
'
Static I As Integer
Dim X!
Dim Y!
Dim R!
Dim Pi!
'
'
Pi! = 3.141592654
'
' Changing R! changes the Circles Diameter
R! = 50
'
Select Case I
    '
    Case 0
        X! = R!: Y! = 0: I = 1
    Case 1
        X! = 0: Y! = R! * -1: I = 2
    Case 2
        X! = (R! * -1): Y! = 0: I = 3
    Case 3
        X! = 0: Y! = R!: I = 0
End Select
'
'
'
' Clear Picture1
Picture1.Cls
'
' Print X! Y! Values
Picture1.CurrentX = 0.2: Picture1.CurrentY = -0.2
Picture1.Print " Center X! = "; X!; " "; " Center Y! = "; Y!
'
'
' Draw Axis at (o,o)
Picture1.Line (1 * -1, 0)-(1, 0), vbBlack
Picture1.Line (0, 1)-(0, 1 * -1), vbBlack
'
' DRAW CIRCLE
' object.Circle [Step] (x, y), radius, [color, start, end, aspect]
' Picture1.CurrentX = X!: Picture1.CurrentY = Y! ' Makes no difference!!!
Picture1.Circle (X!, Y!), R!, vbRed, 0!, 0!, 1! ' Y ERROR !!!
' Put a small line to mark the center of the circle
If X! <> 0 Then Picture1.Line (X!, 1)-(X!, -1), vbGreen
If Y! <> 0 Then Picture1.Line (-1, Y!)-(1, Y!), vbGreen
' draw a line that represents the Radius R!
' Note: how it displays properly while the Circumference does not!
' Also that the problem is not limited to the Y axis.
Picture1.Line (0, 0)-(X!, Y!), vbBlue
'
'
Picture1.Refresh
'
'
'
End code

"Jim Mack" wrote:

> Randy Gardner wrote:
> > Thanks For Responding!
> >
> > Yes I agree, HOWEVER, the program only deals with one axis at a time
> > and regardless of the aspect ratio, 50 units of movement on any axis
> > should be 50 units!!
> >
> > To prove the point, Draw a Line instead of a circle!! NO ERROR!!!!!
> >
> > TRY THIS:: make sure Picture1.height does not equal Picture1.width!!
> >
> > Comment out the Circle and add this line: Picture1.Line (X!, Y!)-(0,
> > 0), vbRed
> >
> > Then execute!!
> >
> > What do you say now - Circle Method has a problem???
> >
> > Thanks,
> >
> > Randy G.
> >
>
> Even granting that there's a problem with the method, which is certainly
> debatable, what do you expect to happen? No one here can 'fix' a method
> built into VB, and MS won't be making any changes to VB, so... I'd say
> that your choices are 1) live with it as is or 2) accept the advice
> given here. Continuing to repeat that there's a problem, when there's
> no solution possible, is a definition of futility.
>
> --
>
> Jim Mack
> MicroDexterity Inc
> www.microdexterity.com
>
>
>



Relevant Pages

  • Re: Need Help
    ... way that the z axis becomes perpendicular to the new axis ... and we are able to use the plane so obtained to draw the ... Once you have have the center, determining the radius will ... sphere given radius and center.How to get a circle?? ...
    (comp.soft-sys.matlab)
  • Re: VB Circle Method Seems to be Seriously Flawed
    ... it works perfectly when the picture box is made square by setting the ... Randy Birch ... : 'Clicking the command button moves the center of the circle to different: axis at Radius, R!, distance and demonstrates that when the center is on or: near the Y axis ...
    (microsoft.public.vb.general.discussion)
  • Re: Need Help
    ... way that the z axis becomes perpendicular to the new axis ... and we are able to use the plane so obtained to draw the ... circle. ...
    (comp.soft-sys.matlab)
  • Re: e to the i pi
    ... axis. ... Draw a circle with radius 1 around the origin. ...
    (comp.lang.c)
  • Re: Need Help
    ... Considering that this is homework, ... way that the z axis becomes perpendicular to the new axis ... and we are able to use the plane so obtained to draw the circle. ...
    (comp.soft-sys.matlab)