Jump to content

Search the Community

Showing results for tags 'geotriangle'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. Hello All I'm trying to create a au3 script for get closer one point from another with iterations. I'm bad at math, and I didn't succeed to create the GetCloser() Func (see below), if anyone have an idea... ^^ Ty #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <Math.au3> #include <MsgBoxConstants.au3> ;Best geometrical representation :) ;~ | ;~ | ;~ | ;~ *B3 | *B1 ;~ | ;~ | ;~ | ;~ +1 ;~ ----------------------..-1,*A +1,..------------------------- ;~ -1 ;~ | ;~ | ;~ | ;~ *B4 | *B2 ;~ | ;~ | ;~ | Local $A[2] Local $B1[2] Local $B2[2] Local $B3[2] Local $B4[2] $A[0] = 0 $A[1] = 0 ;xB > xA & yB > yA (top right corner) $B1[0] = 100 $B1[1] = 100 ;xB > xA & yB < yA (bottom right corner) $B2[0] = 100 $B2[1] = -100 ;xB < xA & yB > yA (top left corner) $B3[0] = -100 $B3[1] = 100 ;xB < xA & yB < yA (bottom right corner) $B4[0] = -100 $B4[1] = -100 ;Same dist for all B points, its ok Local $D1 = Distance($A,$B1);141 Local $D2 = Distance($A,$B2) Local $D3 = Distance($A,$B3) Local $D4 = Distance($A,$B4) ;MsgBox(0,"Dist A <-> B1",$D1) ;MsgBox(0,"Dist A <-> B2",$D2) ;MsgBox(0,"Dist A <-> B3",$D3) ;MsgBox(0,"Dist A <-> B4",$D4) ;get the new $A pos every ($D-20) $step = 20 ;141/6 Then 8 loops ? While $D1 <> 0 $A = GetCloser($A,$B1,$D1,$step) $D1 = Distance($A,$B1) MsgBox(0,"NEW POS","A = "&$A[0]&","&$A[1]) WEnd MsgBox(0,"Pos A = B","A = "&$A[0]&","&$A[1]&" B= "$B[0]&","$B[1]) ;B2,B3,B4 loop laters.... Func Distance($A,$B) local $valeur = (($B[0]-$A[0])^2) + (($B[1]-$A[1])^2) $valeur = Sqrt($valeur) $valeur = Round($valeur,0) return $valeur EndFunc ;Try to understand mathematics... :) ;~ Func Angle($A,$B) ;~ local $angle = _Degree(ATan(($B[1]-$A[1])/($B[0]-$A[0]))) ;~ return $angle ;~ EndFunc ;I really dont know how to do this, I find this ;https://www.developpez.net/forums/d830412/general-developpement/algorithme-mathematiques/mathematiques/calcul-rapprocher-point-d/ (souviron34 answer) Func GetCloser($A,$B,$D,$step) local $newPosA[2] ;x $newPosA[0] = -1;how to calcuate... ACos (or something like this?) ;y $newPosA[1] = -1;how to calcuate...ASin (or something like this?) ;I need this x/y pos return $newposA EndFunc
  2. yeah finally finished my latest script. as attachement Proof_of_Concept pic, & sourcecode + compiled exe in case you don't want to loook for the extra includes or something.. Hope someone likes it :-) here's how to use it. simply run it, and use it as mousepointer (who doesn't want a geotriangle as cursor anyways?) when you want to use it inside for example paint, press Q to quit following the mouse, if you want to close the application just press escape. LEFT & Right rotate the geo triangle up freezes the rotation. down clears the image more features can be found in the code itself. best regards, Dimitri Triangle.zip
×
×
  • Create New...