Overview
Comment:Added preliminary 3D rotation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: bead94a31b3ece6ccea8e34d218313ec659d2c59331663f8fea2faa05ed5883d
User & Date: geraint@users.sourceforge.net on 2002-07-19 20:28:28
Other Links: branch diff | manifest | tags
Context
2002-07-20
14:19:14
Refined rotation bar. check-in: c254a2279d user: geraint@users.sourceforge.net tags: origin/master, trunk
2002-07-19
20:28:28
Added preliminary 3D rotation. check-in: bead94a31b user: geraint@users.sourceforge.net tags: origin/master, trunk
19:37:15
Added adjustment of axis ranges, contour plots, gridlines, timestamp.
Replaced some if..then..else statements with switch statements.
check-in: 50d0b4198b user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/struc2gnuplot_txt2wish from [dee00e821c] to [df61ed3cec].

144
145
146
147
148
149
150

151
152
153
154
155
156
157
158
159

160
161
162
163
164
165
166
pack .plotbar.dim     -expand false -fill x -side right
pack .plotbar.plot    -expand false -fill x -side right
pack .plotbar.select  -expand false -fill x -side right

# button bar
canvas .buttonbar


button .buttonbar.replot -text "Refresh"   -relief raised -command { puts "replot" }

button .buttonbar.newwin -text "New Plot"  -relief raised -command {
    set windownum [expr 1 + \$windownum]
    puts "set term x11 \$windownum"
}

pack .buttonbar.newwin  -expand false -side right
pack .buttonbar.replot  -expand false -side right


## parameter list canvas
canvas		.parameters
listbox		.parameters.list -background oldlace -foreground black
scrollbar	.parameters.yscrollbar	-orient v

## configure scrollbars







>









>







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
pack .plotbar.dim     -expand false -fill x -side right
pack .plotbar.plot    -expand false -fill x -side right
pack .plotbar.select  -expand false -fill x -side right

# button bar
canvas .buttonbar

button .buttonbar.rotate -text "Rotate 3D" -relief raised -command { rotate_3d }
button .buttonbar.replot -text "Refresh"   -relief raised -command { puts "replot" }

button .buttonbar.newwin -text "New Plot"  -relief raised -command {
    set windownum [expr 1 + \$windownum]
    puts "set term x11 \$windownum"
}

pack .buttonbar.newwin  -expand false -side right
pack .buttonbar.replot  -expand false -side right
pack .buttonbar.rotate  -expand false -side right

## parameter list canvas
canvas		.parameters
listbox		.parameters.list -background oldlace -foreground black
scrollbar	.parameters.yscrollbar	-orient v

## configure scrollbars
475
476
477
478
479
480
481





























482
483
484
485
486
487
488
    if {"\$get_scale_status" == "ok"} {
	return "\$get_scale_retval"
    } else {
	return ""
    }
}






























# Defaults
set parameter ""
set windownum 0
set view outputs
set lastplot ""
set select "Select Y"
set xcolumn 1 ; set xtitle "Time"







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
    if {"\$get_scale_status" == "ok"} {
	return "\$get_scale_retval"
    } else {
	return ""
    }
}

proc "rotate_3d" "" {
    listbox .f -background slateblue
    set xrot	30
    set yrot	60
    set scale	1
    set zscale	1
    scale .f.xrot   -background slateblue -foreground yellow -label "Rotate X" -orient h -from "0" -to "180" -command { do_rotate_3d "xrot" }
    scale .f.yrot   -background slateblue -foreground yellow -label "Rotate Z" -orient h -from "0" -to "360" -command { do_rotate_3d "yrot" }
    scale .f.scale  -background slateblue -foreground yellow -label "Scale"    -orient h -from "-4" -to "4" -command { do_rotate_3d "scale" }
    scale .f.zscale -background slateblue -foreground yellow -label "Scale Z"  -orient h -from "-4" -to "4" -command { do_rotate_3d "zscale" }
    button .f.ok -background slateblue -foreground yellow -text "OK" -command { destroy .f }
    pack .f.xrot -side top
    pack .f.yrot -side top
    pack .f.scale -side top
    pack .f.zscale -side top
    pack .f.ok -side bottom
    place .f -in .parameters -relx 0 -rely 0 -relwidth 1 -relheight 1 -anchor nw -bordermode outside
}

proc "do_rotate_3d" "var val" {
    switch -- \$var {
	xrot	{ puts "set view \$val,,, ; replot" }
	yrot	{ puts "set view ,\$val,, ; replot" }
	scale	{ puts "set view ,,[expr pow(2,\$val)], ; replot" }
	zscale	{ puts "set view ,,,[expr pow(2,\$val)] ; replot" }
    }
}

    
# Defaults
set parameter ""
set windownum 0
set view outputs
set lastplot ""
set select "Select Y"
set xcolumn 1 ; set xtitle "Time"


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]