Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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: 2219
47
IntelliJ IDE Firefox Browser Spring Java Linux
  • 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
Posts: 10771
71
Hibernate Eclipse IDE 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
Posts: 10771
71
Hibernate Eclipse IDE 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
Marshal
Posts: 65019
246
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to JavaFX forum as too difficult a question for “Beginning”.
 
Campbell Ritchie
Marshal
Posts: 65019
246
  • 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
Boost this thread!