gmpolygon.tcl
来自「算断裂的」· TCL 代码 · 共 31 行
TCL
31 行
proc gmpolygon num_side { # gmset b [gmpolygon $n] # This routine creates a regular n-sided polygon. Each side is # a separate topological edge. set verts {} set codes {} global PI for {set j 0} {$j < $num_side} {incr j} { if {$j == 0} { lappend codes 0 } else { lappend codes 1 } lappend verts [list [expr cos(2.0 * $PI * $j / $num_side)]\ [expr sin(2.0 * $PI * $j / $num_side)]] } return [gm_cpoly $verts $codes]}# ------------------------------------------------------------------# Copyright (c) 1999 by Cornell University. All rights reserved# See the accompanying file 'Copyright' for authorship information,# the terms of the license governing this software, and disclaimers# concerning this software.# ------------------------------------------------------------------# This file is part of the QMG software. # Version 2.0 of QMG, release date September 3, 1999# ------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?