Results 1 to 3 of 3
  1. #1
    Xetsam is offline Member
    Join Date
    Jan 2013
    Location
    NC
    Posts
    2
    Rep Power
    0

    Question Pivoting lines animation help.

    I've got a buddy in the art business who wants me to write up a simple program for him. What he needs is a program that will draw two lines which intersect, and then he wants to be able to pivot the lines at the intersection.

    My first thought would be to just do the math, calculate the point of intersection, allow the user to select how many degrees he wishes to rotate one line and just mathematically figure out how to update the image.

    But before I go ahead and do all of that work, I was wondering if there happened to be a method that does something similar in the Java API. I can do the GUI, display the lines, and find the pivot point, I just need a pivot method. I'm thinking I'll just have to write my own method, but maybe somebody knows something that will help.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,455
    Rep Power
    20

    Default Re: Pivoting lines animation help.

    AffineTransform#createTransformedShape(...) may be useful. Or not, depending on various other details.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Xetsam is offline Member
    Join Date
    Jan 2013
    Location
    NC
    Posts
    2
    Rep Power
    0

    Default Re: Pivoting lines animation help.

    Ok, I'll take a look at that, thanks.

Similar Threads

  1. Replies: 3
    Last Post: 10-25-2011, 07:29 PM
  2. Animation with Animated GIF
    By JavaBean in forum Java 2D
    Replies: 3
    Last Post: 06-04-2011, 05:26 PM
  3. Animation
    By ryainad in forum Advanced Java
    Replies: 1
    Last Post: 04-04-2011, 06:52 PM
  4. need help about animation ?
    By h9h in forum Java 2D
    Replies: 1
    Last Post: 10-30-2009, 12:41 PM
  5. GUI Animation
    By serfster in forum New To Java
    Replies: 2
    Last Post: 06-11-2008, 04:37 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •