/* polytopes --- Shows one of the six regular polytopes rotating in 4d */
-#if !defined( lint ) && !defined( SABER )
+#if 0
static const char sccsid[] = "@(#)polytopes.c 1.1 03/05/18 xlockmore";
-
#endif
/* Copyright (c) 2003 Carsten Steger <carsten@mirsanmir.org>. */
# define HACK_RESHAPE reshape_polytopes
# define polytopes_opts xlockmore_opts
# define DEFAULTS "*delay: 25000 \n" \
- "*showFPS: False \n" \
- "*wireframe: False \n" \
- "*displayMode: " DEF_DISPLAY_MODE " \n" \
- "*polytope: " DEF_POLYTOPE " \n" \
- "*colors: " DEF_COLORS " \n" \
- "*projection3d: " DEF_3D_PROJECTION " \n" \
- "*projection4d: " DEF_4D_PROJECTION " \n" \
- "speedwx: " DEF_DALPHA " \n" \
- "speedwy: " DEF_DBETA " \n" \
- "speedwz: " DEF_DDELTA " \n" \
- "speedxy: " DEF_DZETA " \n" \
- "speedxz: " DEF_DETA " \n" \
- "speedyz: " DEF_DTHETA " \n"
+ "*showFPS: False \n"
+
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
# include "xlock.h" /* from the xlockmore distribution */
static XrmOptionDescRec opts[] =
{
- {"-mesh", ".polytopes.displayMode", XrmoptionNoArg,
- (caddr_t)DISP_WIREFRAME_STR },
+ {"-wireframe", ".polytopes.displayMode", XrmoptionNoArg,
+ DISP_WIREFRAME_STR },
{"-surface", ".polytopes.displayMode", XrmoptionNoArg,
- (caddr_t)DISP_SURFACE_STR },
+ DISP_SURFACE_STR },
{"-transparent", ".polytopes.displayMode", XrmoptionNoArg,
- (caddr_t)DISP_TRANSPARENT_STR },
+ DISP_TRANSPARENT_STR },
{"-random", ".polytopes.polytope", XrmoptionNoArg,
- (caddr_t)POLYTOPE_RANDOM_STR },
+ POLYTOPE_RANDOM_STR },
{"-5-cell", ".polytopes.polytope", XrmoptionNoArg,
- (caddr_t)POLYTOPE_5_CELL_STR },
+ POLYTOPE_5_CELL_STR },
{"-8-cell", ".polytopes.polytope", XrmoptionNoArg,
- (caddr_t)POLYTOPE_8_CELL_STR },
+ POLYTOPE_8_CELL_STR },
{"-16-cell", ".polytopes.polytope", XrmoptionNoArg,
- (caddr_t)POLYTOPE_16_CELL_STR },
+ POLYTOPE_16_CELL_STR },
{"-24-cell", ".polytopes.polytope", XrmoptionNoArg,
- (caddr_t)POLYTOPE_24_CELL_STR },
+ POLYTOPE_24_CELL_STR },
{"-120-cell", ".polytopes.polytope", XrmoptionNoArg,
- (caddr_t)POLYTOPE_120_CELL_STR },
+ POLYTOPE_120_CELL_STR },
{"-600-cell", ".polytopes.polytope", XrmoptionNoArg,
- (caddr_t)POLYTOPE_600_CELL_STR },
+ POLYTOPE_600_CELL_STR },
{"-single-color", ".polytopes.colors", XrmoptionNoArg,
- (caddr_t)COLORS_SINGLE_STR },
+ COLORS_SINGLE_STR },
{"-depth-colors", ".polytopes.colors", XrmoptionNoArg,
- (caddr_t)COLORS_DEPTH_STR },
+ COLORS_DEPTH_STR },
{"-perspective-3d", ".polytopes.projection3d", XrmoptionNoArg,
- (caddr_t)DISP_3D_PERSPECTIVE_STR },
+ DISP_3D_PERSPECTIVE_STR },
{"-orthographic-3d", ".polytopes.projection3d", XrmoptionNoArg,
- (caddr_t)DISP_3D_ORTHOGRAPHIC_STR },
+ DISP_3D_ORTHOGRAPHIC_STR },
{"-perspective-4d", ".polytopes.projection4d", XrmoptionNoArg,
- (caddr_t)DISP_4D_PERSPECTIVE_STR },
+ DISP_4D_PERSPECTIVE_STR },
{"-orthographic-4d", ".polytopes.projection4d", XrmoptionNoArg,
- (caddr_t)DISP_4D_ORTHOGRAPHIC_STR },
- {"-speed-wx", ".polytopes.speedwx", XrmoptionSepArg,
- (caddr_t)NULL },
- {"-speed-wy", ".polytopes.speedwy", XrmoptionSepArg,
- (caddr_t)NULL },
- {"-speed-wz", ".polytopes.speedwz", XrmoptionSepArg,
- (caddr_t)NULL },
- {"-speed-xy", ".polytopes.speedxy", XrmoptionSepArg,
- (caddr_t)NULL },
- {"-speed-xz", ".polytopes.speedxz", XrmoptionSepArg,
- (caddr_t)NULL },
- {"-speed-yz", ".polytopes.speedyz", XrmoptionSepArg,
- (caddr_t)NULL }
+ DISP_4D_ORTHOGRAPHIC_STR },
+ {"-speed-wx", ".polytopes.speedwx", XrmoptionSepArg, 0 },
+ {"-speed-wy", ".polytopes.speedwy", XrmoptionSepArg, 0 },
+ {"-speed-wz", ".polytopes.speedwz", XrmoptionSepArg, 0 },
+ {"-speed-xy", ".polytopes.speedxy", XrmoptionSepArg, 0 },
+ {"-speed-xz", ".polytopes.speedxz", XrmoptionSepArg, 0 },
+ {"-speed-yz", ".polytopes.speedyz", XrmoptionSepArg, 0 }
};
static argtype vars[] =
{
- { (caddr_t *) &display_mode, "displayMode", "DisplayMode",
- DEF_DISPLAY_MODE, t_Int },
- { (caddr_t *) &polytope, "polytope", "Polytope",
- DEF_POLYTOPE, t_Int },
- { (caddr_t *) &color_mode, "colors", "Colors",
- DEF_COLORS, t_Int },
- { (caddr_t *) &projection_3d, "projection3d", "Projection3d",
- DEF_3D_PROJECTION, t_Int },
- { (caddr_t *) &projection_4d, "projection4d", "Projection4d",
- DEF_4D_PROJECTION, t_Int },
- { (caddr_t *) &speed_wx, "speedwx", "Speedwx",
- DEF_DALPHA, t_Float},
- { (caddr_t *) &speed_wy, "speedwy", "Speedwy",
- DEF_DBETA, t_Float},
- { (caddr_t *) &speed_wz, "speedwz", "Speedwz",
- DEF_DDELTA, t_Float},
- { (caddr_t *) &speed_xy, "speedxy", "Speedxy",
- DEF_DZETA, t_Float},
- { (caddr_t *) &speed_xz, "speedxz", "Speedxz",
- DEF_DETA, t_Float},
- { (caddr_t *) &speed_yz, "speedyz", "Speedyz",
- DEF_DTHETA, t_Float}
+ { &display_mode, "displayMode", "DisplayMode", DEF_DISPLAY_MODE, t_Int },
+ { &polytope, "polytope", "Polytope", DEF_POLYTOPE, t_Int },
+ { &color_mode, "colors", "Colors", DEF_COLORS, t_Int },
+ { &projection_3d, "projection3d", "Projection3d",DEF_3D_PROJECTION, t_Int },
+ { &projection_4d, "projection4d", "Projection4d",DEF_4D_PROJECTION, t_Int },
+ { &speed_wx, "speedwx", "Speedwx", DEF_DALPHA, t_Float},
+ { &speed_wy, "speedwy", "Speedwy", DEF_DBETA, t_Float},
+ { &speed_wz, "speedwz", "Speedwz", DEF_DDELTA, t_Float},
+ { &speed_xy, "speedxy", "Speedxy", DEF_DZETA, t_Float},
+ { &speed_xz, "speedxz", "Speedxz", DEF_DETA, t_Float},
+ { &speed_yz, "speedyz", "Speedyz", DEF_DTHETA, t_Float}
};
static OptionStruct desc[] =
{
- { "-mesh", "display the polytope as a wireframe mesh" },
+ { "-wireframe", "display the polytope as a wireframe mesh" },
{ "-surface", "display the polytope as a solid surface" },
{ "-transparent", "display the polytope as a transparent surface" },
{ "-solid", "display the polytope as a solid object" },