I'm only plotting to PDF.  What I did to "measure" it was to bring a
screenshot into a paint program, cut off the top (horizontal) side, add
perpendicular lines at each corner, rotate it 60 degrees then paste it back
onto the original picture, lining it up with the top right edge.  This is
all shown clearly here:
https://code.jsoftware.com/wiki/NYCJUG/HexagonAspects .

On Tue, Feb 9, 2021 at 7:52 PM bill lam <[email protected]> wrote:

> I think it's ok to have different axis length, but the unit of each axis
> should have the same physical length. Is this a bug in qt output only? Did
> you try output to pdf and then print it out on paper, and measure the
> length of each side of the hexagon using a ruler?
>
>
> On Wed, Feb 10, 2021, 7:42 AM Devon McCormick <[email protected]> wrote:
>
> > Well, on my screen the hexagon looks too tall and the y-axis has extremes
> > of (_0.4, 0.4) whereas the x-axis goes from _0.5 to 0.5, so it does not
> > look properly regular.
> >
> > On Tue, Feb 9, 2021 at 4:19 PM 'Bo Jacoby' via Programming <
> > [email protected]> wrote:
> >
> > >  Devon - 'aspect 1' plot 0.5*_1^3%~i.7 looks perfect!
> > >     Den tirsdag den 9. februar 2021 03.12.52 CET skrev Devon McCormick
> <
> > > [email protected]>:
> > >
> > >  Hauke - you are correct.  A hexagon can be thought of as six
> equilateral
> > > triangles.
> > > Bo - you are correct only for an unscaled hexagon.  See how "'aspect 1'
> > > plot 0.5*_1^3%~i.7" looks.
> > >
> > > Thanks everyone,
> > >
> > > Devon
> > >
> > > On Mon, Feb 8, 2021 at 8:53 AM 'Bo Jacoby' via Programming <
> > > [email protected]> wrote:
> > >
> > > >  'aspect 1'plot _1^3%~i.7
> > > >
> > > >
> > > >    Den mandag den 8. februar 2021 07.22.39 CET skrev Hauke Rehr <
> > > > [email protected]>:
> > > >
> > > >  The picture is Very Wrong™ (but the area formula is correct)
> > > > The lengths of the not-horizontal lines are interchanged.
> > > > And it looks distorted but that’s not too bad.
> > > >
> > > > And then it should be r =. sideOfUnitHexagon
> > > > which is obviously due to the same confusion
> > > > as the mislabelled lines.
> > > >
> > > > Just think of the hexagon cut into six triangles.
> > > > They’ll be regular as well, so radius = side.
> > > >
> > > > Another way to see this is to remember you can
> > > > construct a regular hex by taking a circle and
> > > > repeatedly go around that circle finding
> > > > intersections at one radius distance.
> > > >
> > > > Am 08.02.21 um 06:30 schrieb Devon McCormick:
> > > > > This scales the hexagon to have unit area.
> > > > >    hexagonArea=: 3 : '3*y*(-:y)*%:3'  NB. Where y is side length
> > > > >    sideOfUnitHexagon=: 0.6204032394013997
> > > > >    hexagonArea sideOfUnitHexagon
> > > > > 1
> > > > >    ]r=. sideOfUnitHexagon*-:%:3
> > > > > 0.537285
> > > > >    'title Regular Hexagons Centered at Origin;type line;pensize 2;
> > > aspect
> > > > > 0.866' plot (],.{."1) (r,1)*"(0 1) (_1^1r3)^i.6
> > > > >
> > > > > See
> > > > >
> > > >
> > >
> >
> https://code.jsoftware.com/wiki/NYCJUG/2021-02-09#Corners_of_Unit_Hexagon_Centered_at_Origin
> > > > > for a diagram illustrating why we use the square root of 3.
> > > > >
> > > > > On Sun, Feb 7, 2021 at 4:00 PM Hauke Rehr <[email protected]>
> > > > wrote:
> > > > >
> > > > >> I wonder about that scaling factor in
> > > > >>
> > > > >>    */ , 5e_7 > | hexCorners - 0.537285 * +. (_1^1r3)^i.6
> > > > >>
> > > > >> Is there anything special about it?
> > > > >>
> > > > >>
> > > > >> Am 07.02.21 um 21:28 schrieb Devon McCormick:
> > > > >>> I'm trying to draw a unit hexagon centered at the origin with the
> > > > >>> horizontal sides parallel to the X-axis.  I've come up with these
> > > > >>> co-ordinates for the corners but when I plot them, the drawing
> > looks
> > > a
> > > > >>> little too wide:
> > > > >>>
> > > > >>>    hexCorners=. _2]\,0.537285 0 0.268642 0.465302 _0.268642
> > 0.465302
> > > > >>> _0.537285 0 _0.268642 _0.465302 0.268642 _0.465302
> > > > >>>    'title Regular Unit Hexagon Centered at Origin;type
> line;pensize
> > > 2'
> > > > >> plot
> > > > >>> (],{.) j./"1 hexCorners
> > > > >>>
> > > > >>> I can use my paint program to distort a picture of this plot
> until
> > it
> > > > >> looks
> > > > >>> like it has a square aspect ratio (roughly, width height * 0.92
> > 1.06)
> > > > but
> > > > >>> how can I plot this with the correct aspect ratio in the first
> > place?
> > > > >>>
> > > > >>
> > > > >> --
> > > > >> ----------------------
> > > > >> mail written using NEO
> > > > >> neo-layout.org
> > > > >>
> > ----------------------------------------------------------------------
> > > > >> For information about J forums see
> > > http://www.jsoftware.com/forums.htm
> > > > >>
> > > > >
> > > > >
> > > >
> > > > --
> > > > ----------------------
> > > > mail written using NEO
> > > > neo-layout.org
> > > >
> > > >
> ----------------------------------------------------------------------
> > > > For information about J forums see
> http://www.jsoftware.com/forums.htm
> > > >
> > > >
> ----------------------------------------------------------------------
> > > > For information about J forums see
> http://www.jsoftware.com/forums.htm
> > > >
> > >
> > >
> > > --
> > >
> > > Devon McCormick, CFA
> > >
> > > Quantitative Consultant
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> >
> >
> > --
> >
> > Devon McCormick, CFA
> >
> > Quantitative Consultant
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


-- 

Devon McCormick, CFA

Quantitative Consultant
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to