Answers.Body: <p>You can achieve an effect like this with a couple of distortion filters from most video editing or motion graphics packages. For example in FCPX/Motion, you could apply a couple of Bulge distortion filters to the upper right and lower left and adjust the scale and radius as appropriate.</p>
  
  <p>In terms of implementing it yourself, I agree that it's a question for StackOverflow (once you've attempted to write it yourself). The algorithm is fairly straightforward. For all the pixels within the radius, apply a mapping function along the vector from the center to the current point. For example (in pseudo code):</p>
  
  <pre><code>distort (vec2 center, float radius, float amount)
  {
      for (each pixel in the image)
      {
          vec2 dir = pixel.coord - center;
          float dist = dir.length()
          if (dist &gt;= radius)
          {
              outPixel = pixel;
          }
          else
          {
              float percent = dist / radius;
              float newPos = pow(percent, amount);
              dir = dir / dist;
              vec2 newCoord = dir * newPos * radius;
              outPixel = getPixel(newCoord);
          }
      }
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-18T14:05:54.977Z
Answers.LastActivityDate: 2014-07-18T14:11:55.367Z
Answers.LastEditDate: 2014-07-18T14:11:55.367Z
Answers.UserDisplayName: user1118321
Body: <p>How can I achieve a trippy visual drifting effect like the image is breathing? </p>
  
  <p>See <a href="http://www.disregardeverythingisay.com/post/9331287956/the-visual-components-of-a-psychedelic-experience" rel="nofollow">The Visual Components of a Psychedelic Experience</a> - <strong>Visual drifting</strong> section or more precisely <a href="http://www.youtube.com/v/NaA7yzHh2as&amp;start=91&amp;end=114&amp;version=3" rel="nofollow">this fragment of this video</a>.</p>
  
  <p>Any software solution is fine, but I would be most thrilled with an implementation in Processing or Javascript</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-03-10T14:56:02.207Z
Comments.Text: What do you mean by an implementation in "Processing"?  If you are trying to do this programatically, it may be a better fit for Stack Overflow.  Can you also describe the effect more directly in your question?  The youtube link you provide is already dead on copyright grounds and the other link could go dead in the future.  While external clarifications are helpful, it is best if your question is still able to stand alone without them.
Comments.UserDisplayName: AJ Henderson
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-03-10T18:19:57.673Z
Comments.Text: Processing is a programming lanuage geared towards video manipulation and visual effects. http://processing.org
Comments.UserDisplayName: Jason Conrad
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-03-10T18:48:03.033Z
Comments.Text: BTW, you could probably hold a photo in front of the camera and move it around to get any effect you want. It won't look perfect, of course, but it's an option.
Comments.UserDisplayName: BrettFromLA
Tags: <effects><post-production>
Title: How to achieve trippy breathing effect (visual drifting) on static photo
UserDisplayName: MrX
ThreadText: # How to achieve trippy breathing effect (visual drifting) on static photo
  
  (Asked by: username_0 on 2014-03-10)
  
  How can I achieve a trippy visual drifting effect like the image is breathing?
  
  See [The Visual Components of a Psychedelic Experience](http://www.disregardeverythingisay.com/post/9331287956/the-visual-components-of-a-psychedelic-experience) - **Visual drifting** section or more precisely [this fragment of this video](http://www.youtube.com/v/NaA7yzHh2as&start=91&end=114&version=3).
  
  Any software solution is fine, but I would be most thrilled with an implementation in Processing or Javascript
  
  **Tags:** effects, post-production
  
  > **Comments:**
  > **username_1**: What do you mean by an implementation in "Processing"?  If you are trying to do this programatically, it may be a better fit for Stack Overflow.  Can you also describe the effect more directly in your question?  The youtube link you provide is already dead on copyright grounds and the other link could go dead in the future.  While external clarifications are helpful, it is best if your question is still able to stand alone without them.  
  > **username_2**: Processing is a programming lanuage geared towards video manipulation and visual effects. http://processing.org  
  > **username_3**: BTW, you could probably hold a photo in front of the camera and move it around to get any effect you want. It won't look perfect, of course, but it's an option.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2014-07-18. Score: 2
  
  You can achieve an effect like this with a couple of distortion filters from most video editing or motion graphics packages. For example in FCPX/Motion, you could apply a couple of Bulge distortion filters to the upper right and lower left and adjust the scale and radius as appropriate.
  
  In terms of implementing it yourself, I agree that it's a question for StackOverflow (once you've attempted to write it yourself). The algorithm is fairly straightforward. For all the pixels within the radius, apply a mapping function along the vector from the center to the current point. For example (in pseudo code):
  
  ```
  distort (vec2 center, float radius, float amount)
  {
      for (each pixel in the image)
      {
          vec2 dir = pixel.coord - center;
          float dist = dir.length()
          if (dist >= radius)
          {
              outPixel = pixel;
          }
          else
          {
              float percent = dist / radius;
              float newPos = pow(percent, amount);
              dir = dir / dist;
              vec2 newCoord = dir * newPos * radius;
              outPixel = getPixel(newCoord);
          }
      }
  }
  
  ```
  
  
  ---
  
  