MCPcopy Create free account
hub / github.com/Singular/Singular / saveSurfCode

Method saveSurfCode

Singular/LIB/surfex/CurveAdmin.java:203–249  ·  view source on GitHub ↗
(String filename, String imgFilename)

Source from the content-addressed store, hash-verified

201 */
202
203 public void saveSurfCode(String filename, String imgFilename) {
204 /*try {
205
206 FileOutputStream fo = new FileOutputStream(filename);
207
208 PrintWriter pw = new PrintWriter(fo, true);
209
210 pw.println("scale_x = " + scale[0] + ";");
211 pw.println("scale_y = " + scale[1] + ";");
212 pw.println("scale_z = " + scale[2] + ";");
213 pw.println("radius=9.0;");
214
215 pw
216 .println("illumination = ambient_light + diffuse_light + reflected_light + transmitted_light;");
217 pw
218 .println("ambient = 40;\ndiffuse = 80;\nreflected = 80;\ntransmitted = 20;");
219 pw.println("smoothness = 50;\ntransparence = 0;");
220 pw.println("thickness = 10;");
221 pw
222 .println("background_red=0; background_green=0; background_blue=0;");
223 // Polynome aus der Liste uebergebn
224 ListIterator li = cunList.listIterator();
225 Curve thisEqn;
226 int lc = 0;
227 int ec = 1;
228 while (li.hasNext()) {
229 thisEqn = (Curve) li.next();
230 if (thisEqn.isSelected()) {
231 if (lc <= 9) {
232 thisEqn.savesurfCode(pw, "f" + ec, lc + 1, jv4sx
233 .getCameraRotationYXZ());
234 lc++;
235 }
236 }
237 ec++;
238 }
239
240 pw.println("draw_surface;");
241 pw.println("filename=\""+imgFilename+"\";");
242 // pw.println("color_file_format=jpg;");
243 pw.println("save_color_image;");
244
245 pw.close();
246 } catch (IOException er) {
247 System.out.println(er);
248 } */
249 }
250
251 public void updateCurvePanel() {
252 cuPanel.removeAll();

Callers 1

saveFileMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected