• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    [ANSWERED] Converting Row/Column to Index for Data Array Accces

    How To... ?
    convert data array
    4
    7
    1418
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bonemap
      bonemap Izzy Guru last edited by mark

      Hi,

      I am looking for a way to effectively translate and converge two coordinate systems. One is x, y, data in the form -50/50 the other coordinates read in as lines by the Data Array from an external file. The two systems can be visualised as an overlay like this following image for a 100 line array:

      The approach is to call a specific line from the external array based on an x and y position, for example the X,Y coordinate -2,4 would trigger line 14 and 4,-2 trigger line 69.

      Any thoughts on how to make a dynamic conversion for these data sets?

      Best Wishes

      Russell

      [EDIT: Changed your headline to make what you were asking a bit more specific -- Mark]

      http://bonemap.com | Australia
      Izzy STD 4.2 | USB 3.6 | + Beta
      MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
      Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
      A range of deployable older Macs

      jhoepffner 1 Reply Last reply Reply Quote 1
      • jhoepffner
        jhoepffner @bonemap last edited by

        @bonemap

        Hello,

        The formula

        L = (X + 5) + (5-Y) *10

        Will make the works, easy to make with calculators or JavaScript.

        Have a nice day

        Jacques Hoepffner http://hoepffner.info
        GigaByte 550b / Ryzen 7 3800X / Ram 64 Go / RTX 3090 24 Go / SSD 2 To / raid0 32 To
        MBP 13' i5 2.6 Ghz 16 Go / Intel Iris / macOs 10.11.6 / izzy 2.6.1 + 3.0.3b2
        MBP 15' i7 2.6 Ghz 16 Go / GTX 650M 1Go/ MacOs10.13.3 / Izzy 2.6.1
        MSI GS65 i7 3.6 Ghz 32 Go / GTX 1070 8 Go / Windows 10 / Izzy 3.0.3b2

        jhoepffner 1 Reply Last reply Reply Quote 1
        • jhoepffner
          jhoepffner @jhoepffner last edited by

          @jhoepffner

          Sorry, I just see there is no zero!

          So you have to introduce a conditional line

          if (x < 0) & (Y > 0):
              L = (X + 6) + (5-Y) *10
          elif (X < 0) & (Y < 0):
              L = (X + 6) + (6-Y) * 10
          elif (X  > 0) & (Y > 0):
              L = (X + 5) + (5-Y) *10
          elif (X  > 0) & (Y < 0):
              L = (X + 5) + (6-Y) *10


          Jacques Hoepffner http://hoepffner.info
          GigaByte 550b / Ryzen 7 3800X / Ram 64 Go / RTX 3090 24 Go / SSD 2 To / raid0 32 To
          MBP 13' i5 2.6 Ghz 16 Go / Intel Iris / macOs 10.11.6 / izzy 2.6.1 + 3.0.3b2
          MBP 15' i7 2.6 Ghz 16 Go / GTX 650M 1Go/ MacOs10.13.3 / Izzy 2.6.1
          MSI GS65 i7 3.6 Ghz 32 Go / GTX 1070 8 Go / Windows 10 / Izzy 3.0.3b2

          mark 1 Reply Last reply Reply Quote 2
          • mark
            mark @jhoepffner last edited by mark

            @jhoepffner said:

            Sorry, I just see there is no zero!

            Another way to deal with the missing zero.


            Use the Calculator actor to add 6 to the values from (-5,-4,-3,-2,-1,1,2,3,4,5) and you'll get a value from 0 to 9. Here's how to do the rest.


            And the User Actor that does it.

            Row-Col to Index.iua3

            Best Wishes,
            Mark

            Media Artist & Creator of Isadora
            Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

            bonemap Woland 2 Replies Last reply Reply Quote 2
            • bonemap
              bonemap Izzy Guru @mark last edited by

              @mark

              Thank you! great solution!

              I did have some stray points being produced when the '0' in the middle of the Table actor was called (for example causing line 100 to be triggered where it wasn't wanted). For my purposes I was able to replace the middle 0 with a 5 and use another calculator to add 1 to the output. It appears to be working visually more cleanly for my purposes.

              Best Wishes

              Russell

              http://bonemap.com | Australia
              Izzy STD 4.2 | USB 3.6 | + Beta
              MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
              Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
              A range of deployable older Macs

              1 Reply Last reply Reply Quote 0
              • Woland
                Woland Tech Staff @mark last edited by

                @mark said:

                And the User Actor that does it. Row-Col to Index.iua3

                 May I suggest putting this on the Plugins Page, Dear Leader?

                TroikaTronix Technical Support
                New Support Ticket: https://support.troikatronix.com/support/tickets/new
                Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
                Add-Ons: https://troikatronix.com/add-ons/ & https://troikatronix.com/add-ons/?u=woland
                Professional Services: https://support.troikatronix.com/support/solutions/articles/13000109444

                | Isadora Version: all of them | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s |

                mark 1 Reply Last reply Reply Quote 0
                • mark
                  mark @Woland last edited by mark

                  @woland said:

                   May I suggest putting this on the Plugins Page, Dear Leader?

                  Because of the fact it doesn't respond to 0 in the middle, I would not consider this a general case. That will cause confusion which could generate support questions/tickets, etc.

                  Best Wishes,
                  Mark

                  Media Artist & Creator of Isadora
                  Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post