Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pivot point in java?

 
Karan Jawa
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anybody tell me what is the pivot point in java?
 
Paweł Baczyński
Bartender
Posts: 1878
35
Firefox Browser IntelliJ IDE Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pivot point is a term that is not related to Java in any way.

Do you have an assignment about writing a program related to pivot points?
 
Winston Gutkowski
Bartender
Pie
Posts: 10571
64
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Karan Jawa wrote:can anybody tell me what is the pivot point in java?

No. But I suspect that what you mean is a pivot point in a SORT (usually something like QuickSort), and that is the element about which you choose your "left" and "right" subsets.

And it's the same in every language.

HIH

Winston
 
Karan Jawa
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have got an assignment in javaFX in which we have to rotate the rectangle using transform method .
like,
Rectangle rectThree=new Rectangle(290,100,190,45);
rectThree.getTransforms().add(new Rotate(45,50,50));
 
Winston Gutkowski
Bartender
Pie
Posts: 10571
64
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Karan Jawa wrote:I have got an assignment in javaFX in which we have to rotate the rectangle using transform method .
like,
Rectangle rectThree=new Rectangle(290,100,190,45);
rectThree.getTransforms().add(new Rotate(45,50,50));

OK, so it looks like you want to know how to rotate a rectangle about a "pivot point" and return its primary corner vertices. Correct me if I'm wrong.

Again, this has nothing to do with Java, it's pure maths; and the answer (and methodology) will be the same in any language.

So perhaps the first question (and I'm not meaning to sound "superior" here) is: Do you know the maths involved?

Winston
 
Campbell Ritchie
Sheriff
Posts: 51436
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to JavaFX forum as too difficult a question for “Beginning”.
 
Campbell Ritchie
Sheriff
Posts: 51436
87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be able to work out what the three numbers in the transform arguments mean from the API documentation. Basically, you want to move the origin to the middle of your rectangle and then rotate around that point. I don't think it is called a pivot point, however.
 
Karan Jawa
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okk i will figure it out,thanks by the way.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic