diff --git a/Common/Options.cpp b/Common/Options.cpp
index bd483dc5734752d86b30c2a02713cf9492bb4f0f..daa962ba8b8eddbd3df9b5e20c1064c7b2dc2907 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.103 2003-03-26 16:57:06 geuzaine Exp $
+// $Id: Options.cpp,v 1.104 2003-03-26 21:43:10 geuzaine Exp $
 //
 // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 //
@@ -1722,21 +1722,33 @@ double opt_general_rotation2(OPT_ARGS_NUM)
 double opt_general_rotation_center0(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
-    CTX.rotation_center[0] = (int)val;
+    CTX.rotation_center[0] = val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[8]->value(CTX.rotation_center[0]);
+#endif
   return CTX.rotation_center[0];
 }
 
 double opt_general_rotation_center1(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
-    CTX.rotation_center[1] = (int)val;
+    CTX.rotation_center[1] = val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[9]->value(CTX.rotation_center[1]);
+#endif
   return CTX.rotation_center[1];
 }
 
 double opt_general_rotation_center2(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
-    CTX.rotation_center[2] = (int)val;
+    CTX.rotation_center[2] = val;
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->gen_value[10]->value(CTX.rotation_center[2]);
+#endif
   return CTX.rotation_center[2];
 }
 
@@ -2019,8 +2031,10 @@ double opt_general_rotation_center_cg(OPT_ARGS_NUM)
   if(action & GMSH_SET)
     CTX.rotation_center_cg = (int)val;
 #if defined(HAVE_FLTK)
-  if(WID && (action & GMSH_GUI))
+  if(WID && (action & GMSH_GUI)){
     WID->gen_butt[15]->value(CTX.rotation_center_cg);
+    WID->check_rotation_center_button();
+  }
 #endif
   return CTX.rotation_center_cg;
 }
diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index 899c1c4d99aa3a1fd31e6ab47cca12b31eaae907..388be5cff33c7c76c8ce5e5f7e7a162c220e1493 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.169 2003-03-26 16:57:06 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.170 2003-03-26 21:43:10 geuzaine Exp $
 //
 // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 //
@@ -797,6 +797,11 @@ void general_options_color_scheme_cb(CALLBACK_ARGS)
   Draw();
 }
 
+void general_options_rotation_center_cb(CALLBACK_ARGS)
+{
+  WID->check_rotation_center_button();
+}
+
 void general_options_ok_cb(CALLBACK_ARGS)
 {
   opt_general_axes(0, GMSH_SET, WID->gen_butt[0]->value());
diff --git a/Fltk/Callbacks.h b/Fltk/Callbacks.h
index 18e8430692415c6c78de20e740645941b98f9d71..65063bf559350caafd7fc38f8a0936c4b9566556 100644
--- a/Fltk/Callbacks.h
+++ b/Fltk/Callbacks.h
@@ -78,6 +78,7 @@ void options_ok_cb(CALLBACK_ARGS) ;
 
 void general_options_cb(CALLBACK_ARGS) ;
 void general_options_color_scheme_cb(CALLBACK_ARGS) ;
+void general_options_rotation_center_cb(CALLBACK_ARGS) ;
 void general_options_ok_cb(CALLBACK_ARGS) ;
 
 void geometry_options_cb(CALLBACK_ARGS) ;
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index e4e15f4d6dd8f03500e79df8142539df026ccb7a..e6a7f0cf3a17b536b1b52b29653dae39f08fe316 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.233 2003-03-26 16:57:07 geuzaine Exp $
+// $Id: GUI.cpp,v 1.234 2003-03-26 21:43:10 geuzaine Exp $
 //
 // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 //
@@ -1285,6 +1285,20 @@ void GUI::reset_option_browser()
     opt_browser->value(select);
 }
 
+void GUI::check_rotation_center_button()
+{
+  if(gen_butt[15]->value()) {
+    gen_value[8]->deactivate();
+    gen_value[9]->deactivate();
+    gen_value[10]->deactivate();
+  }
+  else {
+    gen_value[8]->activate();
+    gen_value[9]->activate();
+    gen_value[10]->activate();
+  }
+}
+
 void GUI::create_option_window()
 {
   int i;
@@ -1353,15 +1367,17 @@ void GUI::create_option_window()
         gen_butt[i]->selection_color(TOGGLE_COLOR);
       }
 
-      gen_butt[15] = new Fl_Check_Button(2 * WB, 2 * WB + 9 * BH, BW, BH, "Rotate around center of gravity");
+      gen_butt[15] = new Fl_Check_Button(2 * WB, 2 * WB + 9 * BH, BW, BH, "Rotate around pseudo center of gravity");
       gen_butt[15]->type(FL_TOGGLE_BUTTON);
       gen_butt[15]->down_box(TOGGLE_BOX);
       gen_butt[15]->selection_color(TOGGLE_COLOR);
+      gen_butt[15]->callback(general_options_rotation_center_cb);
 
       gen_value[8] = new Fl_Value_Input(2 * WB, 2 * WB + 10 * BH, IW / 3, BH);
       gen_value[9] = new Fl_Value_Input(2 * WB + IW / 3, 2 * WB + 10 * BH, IW / 3, BH);
       gen_value[10] = new Fl_Value_Input(2 * WB + 2 * IW / 3, 2 * WB + 10 * BH, IW / 3, BH, "Rotation center");
       gen_value[10]->align(FL_ALIGN_RIGHT);
+
       o->end();
     }
     {
diff --git a/Fltk/GUI.h b/Fltk/GUI.h
index 7ebf4e0ac1ad57d58865ba3c66120e7cb41e3f38..0ffe0bfcd0938170e91bae9eed37de1334bfb07f 100644
--- a/Fltk/GUI.h
+++ b/Fltk/GUI.h
@@ -160,17 +160,17 @@ public:
   // general options
   Fl_Window        *gen_window ;
   Fl_Check_Button  *gen_butt[20] ;
-  Fl_Value_Input   *gen_value[10] ;
+  Fl_Value_Input   *gen_value[20] ;
   Fl_Button        *gen_col[50] ;
-  Fl_Input         *gen_input[10] ;
+  Fl_Input         *gen_input[20] ;
 
   // geometry options
   Fl_Window        *geo_window ;
-  Fl_Check_Button  *geo_butt[10] ;
+  Fl_Check_Button  *geo_butt[20] ;
   Fl_Input         *geo_input ;
-  Fl_Value_Input   *geo_value[10] ;
+  Fl_Value_Input   *geo_value[20] ;
   Fl_Button        *geo_col[50] ;
-  Fl_Choice        *geo_choice[5] ;
+  Fl_Choice        *geo_choice[20] ;
   
   // mesh options
   Fl_Window        *mesh_window ;
@@ -178,7 +178,7 @@ public:
   Fl_Input         *mesh_input ;
   Fl_Value_Input   *mesh_value[20] ;
   Fl_Button        *mesh_col[50] ;
-  Fl_Choice        *mesh_choice[5] ;
+  Fl_Choice        *mesh_choice[20] ;
 
   // solver options
   Fl_Window        *solver_window ;
@@ -229,7 +229,7 @@ public:
   // mesh context window
   Fl_Window        *context_mesh_window ;
   Fl_Input         *context_mesh_input[20] ;
-  Fl_Choice        *context_mesh_choice[5] ;
+  Fl_Choice        *context_mesh_choice[20] ;
 
   // solver windows
   SolverDialogBox  solver[5] ;
@@ -271,6 +271,7 @@ public:
   int  get_context();
   void set_anim_buttons(int mode);
   void check_anim_buttons();
+  void check_rotation_center_button();
   void set_status(char *msg, int num);
   void add_message(char *msg);
   void save_message(char *filename);
diff --git a/Graphics/Makefile b/Graphics/Makefile
index cfbf9ca683b213608e1309304509ef01cc9bd01f..206d9c16f42a73beae8b40554e72bd4c0ed1ce2b 100644
--- a/Graphics/Makefile
+++ b/Graphics/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.49 2003-03-21 00:52:39 geuzaine Exp $
+# $Id: Makefile,v 1.50 2003-03-26 21:43:10 geuzaine Exp $
 #
 # Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
 #
@@ -74,7 +74,8 @@ Draw.o: Draw.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../Common/GmshUI.h ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h \
   ../Mesh/Simplex.h ../Mesh/Edge.h ../Geo/ExtrudeParams.h ../Mesh/STL.h \
   ../Mesh/Metric.h ../Mesh/Matrix.h Draw.h ../Common/Views.h \
-  ../Common/ColorTable.h ../Common/Context.h ../Geo/MinMax.h
+  ../Common/ColorTable.h ../Common/Context.h ../Geo/MinMax.h \
+  ../Numeric/Numeric.h
 Mesh.o: Mesh.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
   ../Common/GmshUI.h ../Geo/Geo.h ../Geo/CAD.h ../Mesh/Mesh.h \