Re: Draw a scaled arrow




The trick is to move the origin to the root of the arrow with a
transform before you apply the scale.

see http://mindprod.com/jgloss/affinetransform.html

Thanks this is very helpful.
It is at this point I wish I had paid attention in Math class instead of
sketching the next killer game in the back of my work book :(

There are two parts of the arrow, the line and the head, the line is fairly easy multiply the x1,y1 and x2,y2 coordinates by the scale and do the same for thickness of brush.

the head is made up of 3 pairs of x,y coords, my first idea was to move the centre point to the new line end of the scaled arrow, and then apply the scale factor to the remaining coords, this did not work too well because the head can be rotated dependent on the direction of the arrow.

I am already using a transform to scale and translate the image when it is zoomed at a particular point, would this affect th other transform?

Thanks anyway for this info
Rich
.



Relevant Pages

  • Disertation Help 2 Mins of you time needed
    ... Transform { ... scale 0.2 0.2 0.2 ... bboxSize 1 1 1 ... translation -37 0 -19.5 ...
    (comp.lang.vrml)
  • Re: Zoom relative to mouse position
    ... I am trying to figure out how to zoom relative to the mouse pointer ... When I initially position the mouse pointer on one corner of the red ... I think I may be missing a transform or two. ... to scale then translate, you have to apply then in reverse order. ...
    (comp.lang.java.programmer)
  • Re: D3DXVec3Scal
    ... Scaling transformations always scale about some point. ... scaling to the origin, perform the scale, and then transform the ... transform the selected vertices to the origin. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Median. Should I use it in this case?
    ... For example, I get 2.1 for female and 2.8 for male using the 1,2,3 ... if you don't like reporting on a 1 to 3 scale, ... and you want to transform to 0-1 or 0-100%, ... incorrect as I showed above. ...
    (sci.stat.math)
  • Re: xgl file format
    ... format to opengl. ... <TRANSFORM> ... For POSITION I use glTranslatef and for SCALE I use glScalef. ... positive Z axis, UP the direction of the local positive Y axis. ...
    (comp.graphics.api.opengl)