Cartesian to Polar & Polar to Cartesian Coordinate
Cartesian / Rectangular to Polar Conversion The java code converts the Cartesian coordinate values (x,y) into polar coordinate values (r,Θ) . The input values for x and y are read from the user using scanner object and these values are converted into corresponding polar coordinate values by following two equations. Polar Coordinate radius Polar Coordinate theta import java.util.Scanner; public class Cartesian2Polar { public static void main(String[] args) { System.out.println( "\nCartesian to Polar Conversion" ); Scanner sc = new Scanner(System.in); System.out.println( "\n Enter x-axis value : " ); int x =sc.nextInt(); System.out.println( "\n Enter y-axis value : " ); int y =sc.nextInt(); double radius = Math.sqrt( Math.pow(x, 2) + Math.pow(y, 2) ); double radiant = Math.atan(y/x); double angle = radiant * (180/Math.P...