Dear Gabor, Thanks for the links. I found a a tcl script (see below ; from http://wiki.tcl.tk/15977) which could be a good starting point but I'm not able to translate it into R. Could you help me ? In particularly, what is the command corresponding to append_float_dialog_item ? I looked in ?tcltk but I haven't found "append" command.
Thanks in advance, Have a nice week-end, Ptit Bleu ----------------------------------------------------- # Simple sphere demo with UI for Shade # Variables: radius, center coordinates, RGB color set r 600 set X 0 set Y 0 set Z 0 set R 1.0 set G 0.1 set B 0.1 # The UI starts here begin_dialog # Create a dialog box with 7 typed entries append_float_dialog_item "Radius" append_float_dialog_item "X center" append_float_dialog_item "Y center" append_float_dialog_item "Z center" append_float_dialog_item "Red value (0..1)" append_float_dialog_item "Green value (0..1)" append_float_dialog_item "Blue value (0..1)" # Initial values for items set_float_property_value 0 to $r set_float_property_value 1 to $X set_float_property_value 2 to $Y set_float_property_value 3 to $Z set_float_property_value 4 to $R set_float_property_value 5 to $G set_float_property_value 6 to $B # ask_dialog is true if we hit on OK button if [ask_dialog] { set r [get_float_property_value 0] set X [get_float_property_value 1] set Y [get_float_property_value 2] set Z [get_float_property_value 3] set R [get_float_property_value 4] set G [get_float_property_value 5] set B [get_float_property_value 6] if {$R > 1.0} {set R 1.0} if {$G > 1.0} {set G 1.0} if {$B > 1.0} {set B 1.0} end_dialog } else { end_dialog error cancel_dialog } # End of UI # Create a tagged sphere with radius r at <X,Y,Z> coordinates create_sphere at [list $X $Y $Z] r $r sphere_1 # set color to sphere_1 set base_color [list $R $G $B] # Render the result render -- View this message in context: http://www.nabble.com/Friendly-way-to--link-R---MySQL-and-non-%28R-and-Mysql%29-users---tf4844081.html#a13908847 Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.