public static ResultSet polar2CartesianSet(Connection conn, String query) throws SQLException {
SimpleResultSet result = new SimpleResultSet();
result.addColumn("R", Types.DOUBLE, 0, 0);
result.addColumn("A", Types.DOUBLE, 0, 0);
result.addColumn("X", Types.DOUBLE, 0, 0);
result.addColumn("Y", Types.DOUBLE, 0, 0);
if (query != null) {
ResultSet rs = conn.createStatement().executeQuery(query);
while (rs.next()) {
double r = rs.getDouble("R");
double alpha = rs.getDouble("A");