VFLP/HFLP - Flip elements around

  • DRAGONF0RCE
    19th Sep 2011 Member 0 Permalink
    I know it sounds very complicated, but it probably wouldn't be that hard to program. It would, however, likely cause lag.

    When using VFLP (Vertical Flip), you select a rectangle of elements (similar to ctrl+clicking), they will be flipped vertically.
    HFLP would do the same thing but horizontally.
    RTAT would rotate the selection 180 degrees.
    Here's an example of what it would look like:


    I'm not sure of how TPT is coded, but here's an idea of how it might be able to be done:
    -assume [a,b] is the interval of x values of the particles in the rectangle selected
    -assume [c,d] is the interval of y values in the rectangle
    -(x,y) is the position of any given particle in the rectangle, such that (a,c) is the origin

    HFLP
    1. Find the particle closest to the top-left corner
    2. Find (b-x, d) and temporarily store that value along with the particle's type, ctype, temp and tmp
    3. Repeat 1 and 2 until it has been done to all particles
    4. Delete all particles
    5. Replace all the particles, except in the positions calculated from step 2.

    VFLP
    1. Find the particle closest to the top-left corner
    2. Find (b, d-y) and temporarily store that value along with the particle's type, ctype, temp and tmp
    3. Repeat 1 and 2 until it has been done to all particles
    4. Delete all particles
    5. Replace all the particles, except in the positions calculated from step 2.

    It would help A TON if you need to flip a large part around, so that you wouldn't have to copy each individual pixel.
  • Jackeea
    19th Sep 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • alecnotalex
    19th Sep 2011 Member 0 Permalink
    @Jackeea (View Post)
    That's your excuse for everything. Do you even have any experience or knowledge of element coding?

    BTW You can already flip things and stuff.
  • DRAGONF0RCE
    19th Sep 2011 Member 0 Permalink
    @Jackeea It's probably possible with lua, but most people (including me) don't know how to make lua scripts. By "laggy", I meant that it would take a few seconds to flip it because repeating those steps for thousands of particles would be very processor-heavy.
    @alecnotalex how do you do it? it would be extremely helpful for something I'm trying to make.
  • alecnotalex
    19th Sep 2011 Member 0 Permalink
    @DRAGONF0RCE (View Post)
    So make a stamp of it by pressing 's' or control+c. Then press 'L', then before clicking, press 'r'. This rotates it. To flip it, stamp it, press 'L', and before clicking, press control+f.
  • DRAGONF0RCE
    19th Sep 2011 Member 0 Permalink
    The "r" hotkey isn't working for me, I'm not sure why.
  • Jackeea
    19th Sep 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • alecnotalex
    19th Sep 2011 Member 0 Permalink
    @DRAGONF0RCE (View Post)
    Try control+r

    @jackeea
    You say every element is going to be laggy.
  • DRAGONF0RCE
    19th Sep 2011 Member 0 Permalink
    @alecnotalex (View Post)
    Thanks, that will work for what I'm doing! It's not the same as what this thread is about, though; it rotates the selection, and rotating something 180 degrees isn't the same as mirroring it.

    @jackeea Also, the fact that it lags is completely irrelevant since it's a tool and not an actual element. You use it once, it slows down for a second or two, and then it goes back to normal.
  • alecnotalex
    19th Sep 2011 Member 0 Permalink
    @DRAGONF0RCE (View Post)
    Mirroring can be done by control+f. Or I think those are the keys.
Locked by Simon-: Answered.