gmmake_circ.tcl

来自「算断裂的」· TCL 代码 · 共 29 行

TCL
29
字号
proc gmmake_circ numsubdiv {    # gmmake_circ $numsubdiv    # Make a cubic bezier approximation to a circle.  Argument    # is the number of subdivisions.    if {$numsubdiv < 3} {	error "Number of bezier subdivisions must be at least 3"    }    global PI    global qmg_library2    gmset {vertex code} [gm_circ_approx 0 [expr 2 * $PI] $numsubdiv]    set vertex [lrange $vertex 0 [expr 3 * $numsubdiv - 1]]    set code [lrange $code 0 [expr 3 * $numsubdiv - 1]]    set code [lreplace $code 0 0 0]    set c [gm_cpoly $vertex $code]    return $c}# ------------------------------------------------------------------# 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 + -
显示快捷键?