Angle graphical hotspot
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2004-08-04 03:42 PM
2004-08-04
03:42 PM
I get either the angle value, or the radius value, but not both (for the same hotspot).
Any advice?
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2004-08-04 06:46 PM
2004-08-04
06:46 PM
I have a routine that does this, but it may not be what you want. You can move a point on the radius arbitrarily, modifying the radius and angle at the same time, but you can't input the radius or the angle while moving. The radius/angle and the XY position of the spot are independent parameters bound together by GLOB_MODPAR_NAME. The parameters you see as you move the spot are the XY position parameters.
If you're interested,
!Parameters
!lenx : X distance
!leny : Y distance
!rad : radius
!ng : angle
I have found, as you did, that overlapping angle and length hotspots don't work.
If you're interested,
!Parameters
!lenx : X distance
!leny : Y distance
!rad : radius
!ng : angle
!Master Script !when X & Y are modified graphically, recalculate rad & ng. IF GLOB_MODPAR_NAME='lenx' OR GLOB_MODPAR_NAME='leny' THEN ng=ATN(leny/lenx) IF lenx<0 THEN ng=90+(90+ng) IF leny<0 THEN ng=360+ng IF ng>360 THEN ng=ng-360 PARAMETERS ng=ng rad=SQR(lenx^2+leny^2) PARAMETERS rad=rad ENDIF !when rad & ng are modified in the settings, or with other spots, recalculate X & Y. IF GLOB_MODPAR_NAME='rad' OR GLOB_MODPAR_NAME='ng' THEN lenx=rad*COS(ng) PARAMETERS lenx=lenx leny=rad*SIN(ng) PARAMETERS leny=leny ENDIF
!2D Script HOTSPOT2 0, leny, hsid, lenx, 1+128 : hsid=hsid+1 !b HOTSPOT2 lenx, leny, hsid, lenx, 2 : hsid=hsid+1 !m HOTSPOT2 -1, leny, hsid, lenx, 3 : hsid=hsid+1 !r HOTSPOT2 lenx, 0, hsid, leny, 1+128 : hsid=hsid+1 !b HOTSPOT2 lenx, leny, hsid, leny, 2 : hsid=hsid+1 !m HOTSPOT2 lenx, -1, hsid, leny, 3 : hsid=hsid+1 !r ARC2 0,0,rad,0,ng HOTSPOT2 0,0 HOTSPOT2 rad,0You could add editing hotspots for rad, or use A for the radius instead.
I have found, as you did, that overlapping angle and length hotspots don't work.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2004-08-04 07:47 PM
2004-08-04
07:47 PM
James wrote:May be for the whislist? I let you do it, if you agree, because you
I have found, as you did, that overlapping angle and length hotspots don't work.
will explain this better than me.
Thanks for the workaround, not exactly what i need, as you said, but interesting.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2004-08-05 06:08 PM
2004-08-05
06:08 PM
Done. I hope I explained it well enough.
I just realized I forgot to attach my screen shot of the posted code in action.
I just realized I forgot to attach my screen shot of the posted code in action.