irteus拡張¶
GL/X表示¶
polygon
line
faceset
:set-color gl::color &optional (gl::transparent)
Set color of given color name, color sample and color name are referenced from http://en.wikipedia.org/wiki/X11_color_names
:paste-texture-to-face gl::aface &key gl::file gl::image (gl::tex-coords (list (float-vector 0 0) (float-vector 0 1) (float-vector 1 1) (float-vector 1 0)))
:draw-on &key ((:viewer gl::vwer) viewer) gl::flush (gl::width 1) (gl::color #f(1.0 1.0 1.0))
coordinates
float-vector
gl::glvertices
:set-color gl::color &optional (gl::transparent)
set color as float vector of 3 elements, and transparent as float, all values are betwenn 0 to 1
:actual-vertices **
return list of vertices(float-vector), it returns all vertices of this object
:calc-bounding-box **
calculate and set bounding box of this object
:vertices **
return list of vertices(float-vector), it returns vertices of bounding box of this object
:reset-offset-from-parent **
move vertices in this object using self transformation, this method change values of vertices. coordinates’s method such as :transform just change view of this object
:expand-vertices **
expand vertices number as same number of indices, it enable to set individual normal to every vertices
:use-flat-shader **
use flat shader mode, use opengl function of glShadeModel(GL_FLAT)
:use-smooth-shader **
use smooth shader mode, use opengl function of glShadeModel(GL_SMOOTH) default
:calc-normals &optional (gl::force nil) (gl::expand t) (gl::flat t)
creating mirror vertices respect to :axis
create list of faces using vertices of this object
:convert-to-faceset &rest args
create faceset using vertices of this object
:set-offset gl::cds &key (gl::create)
move vertices in this object using given coordinates, this method change values of vertices. coordinates’s method such as :transform just change view of this object
:convert-to-world &key (gl::create)
move vertices in this object using self’s coordinates. vertices data should be moved as the same as displayed
:glvertices &optional (name) (gl::test #’string=)
create individual glvertices objects from mesh-list. if name is given, search mesh has the same name
:append-glvertices gl::glv-lst
append list of glvertices to this object
:init gl::mlst &rest args &key ((:filename gl::fn)) &allow-other-keys
:filename &optional gl::nm
:get-meshinfo gl::key &optional (pos -1)
:set-meshinfo gl::key gl::info &optional (pos -1)
:get-material &optional (pos -1)
:set-material gl::mat &optional (pos -1)
:expand-vertices-info gl::minfo
:faces **
:draw-on &key ((:viewer gl::vwer) viewer)
:draw gl::vwr &rest args
:collision-check-objects &rest args
:box **
:make-pqpmodel &key (gl::fat 0)
:append-glvertices gl::glv-lst
append list of glvertices to this object
:glvertices &optional (name) (gl::test #’string=)
create individual glvertices objects from mesh-list. if name is given, search mesh has the same name
:convert-to-world &key (gl::create)
move vertices in this object using self’s coordinates. vertices data should be moved as the same as displayed
:set-offset gl::cds &key (gl::create)
move vertices in this object using given coordinates, this method change values of vertices. coordinates’s method such as :transform just change view of this object
:convert-to-faceset &rest args
create faceset using vertices of this object
create list of faces using vertices of this object
creating mirror vertices respect to :axis
:calc-normals &optional (gl::force nil) (gl::expand t) (gl::flat t)
:use-smooth-shader **
use smooth shader mode, use opengl function of glShadeModel(GL_SMOOTH) default
:use-flat-shader **
use flat shader mode, use opengl function of glShadeModel(GL_FLAT)
:expand-vertices **
expand vertices number as same number of indices, it enable to set individual normal to every vertices
:reset-offset-from-parent **
move vertices in this object using self transformation, this method change values of vertices. coordinates’s method such as :transform just change view of this object
:vertices **
return list of vertices(float-vector), it returns vertices of bounding box of this object
:calc-bounding-box **
calculate and set bounding box of this object
:actual-vertices **
return list of vertices(float-vector), it returns all vertices of this object
:set-color gl::color &optional (gl::transparent)
set color as float vector of 3 elements, and transparent as float, all values are betwenn 0 to 1
:make-pqpmodel &key (gl::fat 0)
:box **
:collision-check-objects &rest args
:draw gl::vwr &rest args
:draw-on &key ((:viewer gl::vwer) viewer)
:faces **
:expand-vertices-info gl::minfo
:set-material gl::mat &optional (pos -1)
:get-material &optional (pos -1)
:set-meshinfo gl::key gl::info &optional (pos -1)
:get-meshinfo gl::key &optional (pos -1)
:filename &optional gl::nm
:init gl::mlst &rest args &key ((:filename gl::fn)) &allow-other-keys
gl::glbody
:set-color &rest args
:draw gl::vwr
:glvertices &rest args
gl::find-color gl::color
returns color vector of given color name, the name is defined in https://github.com/euslisp/jskeus/blob/master/irteus/irtglrgb.l
gl::transparent gl::abody gl::param
Set abody to transparent with param
gl::make-glvertices-from-faceset gl::fs &key (gl::material)
gl::make-glvertices-from-faces gl::flst &key (gl::material)
gl::write-wrl-from-glvertices fname gl::glv &rest args
write .wrl file from instance of glvertices
gl::set-stereo-gl-attribute **
gl::reset-gl-attribute **
gl::delete-displaylist-id gl::dllst
gl::transpose-image-rows gl::img &optional gl::ret
gl::draw-globjects gl::vwr gl::draw-things &key (gl::clear t) (gl::flush t) (gl::draw-origin 150) (gl::draw-floor nil) (gl::floor-color #f(1.0 1.0 1.0))
gl::draw-glbody gl::vwr gl::abody
gl::_dump-wrl-shape gl::strm gl::mesh &key ((:scale gl::scl) 1.0) (gl::use_ambient nil) (gl::use_normal nil) (gl::use_texture nil) &allow-other-keys
x:xwindow
x:panel
x:xscroll-bar
x::tabbed-panel
:resize x::w h
:tabbed-panel name &rest args
:tabbed-button name &rest args
:change-tabbed-panel x::obj
:add-tabbed-panel name
:create &rest args
x::panel-tab-button-item
:draw-label &optional (x::state :up) (x::offset 0)
x::window-main-one &optional fd
x::event-far x::e
x::event-near x::e
ユーティリティ関数¶
mtimer
:init **
Initialize timer object.
:start **
Start timer.
:stop **
Stop timer and returns elapsed time in seconds.
:stop **
Stop timer and returns elapsed time in seconds.
:start **
Start timer.
:init **
Initialize timer object.
interpolator
:init **
Abstract class of interpolator
:position-list **
returns position list
:position **
returns current position
:time-list **
returns time list
:time **
returns current time
:segment-time **
returns time[sec] with in each segment
:segment **
returns index of segment which is currently processing
:segment-num **
returns number of total segment
:interpolatingp **
returns if it is currently processing
:start-interpolation **
start interpolation
:stop-interpolation **
stop interpolation
:pass-time dt
process interpolation for dt[sec]
:pass-time dt
process interpolation for dt[sec]
:stop-interpolation **
stop interpolation
:start-interpolation **
start interpolation
:interpolatingp **
returns if it is currently processing
:segment-num **
returns number of total segment
:segment **
returns index of segment which is currently processing
:segment-time **
returns time[sec] with in each segment
:time **
returns current time
:time-list **
returns time list
:position **
returns current position
:position-list **
returns position list
:init **
Abstract class of interpolator
linear-interpolator
:interpolation **
Linear interpolator
:interpolation **
Linear interpolator
minjerk-interpolator
:velocity **
returns current velocity
:velocity-list **
returns velocity list
:acceleration **
returns current acceleration
:acceleration-list **
returns acceleration list
:interpolation **
:interpolation **
:acceleration-list **
returns acceleration list
:acceleration **
returns current acceleration
:velocity-list **
returns velocity list
:velocity **
returns current velocity
forward-message-to to args
forward _args_ message to _to_ object
forward-message-to-all to args
forward _args_ message to all _to_ object
permutation lst n
Returns permutation of given list
combination lst n
Returns combination of given list
Returns the elements of datum which maximizes key function
eus-server &optional (port 6666) &key (host (unix:gethostname))
Create euslisp interpreter server, data sent to socket is evaluated as lisp expression
Connect euslisp interpreter server until success
format-array arr &optional (header ) (in 7) (fl 3) (strm error-output) (use-line-break t)
print formatted array
his2rgb h &optional (i 1.0) (s 1.0) ret
convert his to rgb (0 <= h <= 360, 0.0 <= i <= 1.0, 0.0 <= s <= 1.0)
hvs2rgb h &optional (i 1.0) (s 1.0) ret
convert hvs to rgb (0 <= h <= 360, 0.0 <= i <= 1.0, 0.0 <= s <= 1.0)
rgb2his r &optional g b ret
convert rgb to his (0 <= r,g,b <= 255)
rgb2hvs r &optional g b ret
convert rt to hvs (0 <= r,g,b <= 255)
color-category10 i
Choose good color from 10 colors
color-category20 i
Choose good color from 20 colors
kbhit **
Checks the console for a keystroke. returns keycode value if a key has been pressed, otherwise it returns nil. Note that this does not work well on Emacs Shell mode, run EusLisp program from terminal shell.
piped-fork-returns-list cmd &optional args
piped fork returning result as list
make-robot-model-from-name name &rest args
make a robot model from string: (make-robot-model ”pr2”)
mapjoin expr seq1 seq2
need-thread n &optional (lsize (512 1024)) (csize lsize)
termios-c_iflag lisp::s
set-termios-c_iflag lisp::s lisp::val
termios-c_oflag lisp::s
set-termios-c_oflag lisp::s lisp::val
termios-c_cflag lisp::s
set-termios-c_cflag lisp::s lisp::val
termios-c_lflag lisp::s
set-termios-c_lflag lisp::s lisp::val
termios-c_line lisp::s
set-termios-c_line lisp::s lisp::val
termios-c_cc lisp::s &optional lisp::i
set-termios-c_cc lisp::s lisp::i &rest lisp::val
termios-c_ispeed lisp::s
set-termios-c_ispeed lisp::s lisp::val
termios-c_ospeed lisp::s
set-termios-c_ospeed lisp::s lisp::val
gnuplot
Initialize gnuplot interface object with given host name
:clear **
Clear graph
:draw &rest vs
:save f &key (type postscript eps color ”Times-Roman” 24)
save graph as eps file
:replot **
:reset **
:command msg
:quit **
:proc-length &optional n
:proc-clear **
:proc-one vs &rest args
:save f &key (type postscript eps color ”Times-Roman” 24)
save graph as eps file
:draw &rest vs
:clear **
Clear graph
Initialize gnuplot interface object with given host name
:proc-one vs &rest args
:proc-clear **
:proc-length &optional n
:quit **
:command msg
:reset **
:replot **
gnuplot &key (host (unix:gethostname))
数学関数¶
inverse-matrix mat
returns inverse matrix of mat
inverse-matrix-complex cmat
returns inverse matrix of complex square matrix
m-complex cmat1 cmat2
returns complex matrix 1 complex matrix 2
diagonal v
make diagonal matrix from given vecgtor, diagonal #f(1 2) ->#2f((1 0)(0 2))
minor-matrix m ic jc
return a matrix removing ic row and jc col elements from m
atan2 y x
returns atan2 of y and x (atan (/ y x))
outer-product-matrix v &optional (ret (unit-matrix 3))
matrix2quaternion m
returns quaternion (w x y z) of given matrix
quaternion2matrix q
returns matrix of given quaternion (w x y z)
matrix-log m
returns matrix log of given m, it returns [-pi, pi]
matrix-exponent omega &optional (p 1.0)
returns exponent of given omega
midrot p r1 r2
returns mid (or p) rotation matrix of given two matrix r1 and r2
pseudo-inverse mat &optional weight-vector ret wmat mat-tmp
returns pseudo inverse of given mat
sr-inverse mat &optional (k 1.0) weight-vector ret wmat tmat umat umat2 mat-tmp mat-tmp-rc mat-tmp-rr mat-tmp-rr2
returns sr-inverse of given mat
manipulability jacobi &optional tmp-mrr tmp-mcr
return manipulability of given matrix
random-gauss &optional (m 0) (s 1)
make random gauss, m:mean s:standard-deviation
gaussian-random dim &optional (m 0) (s 1)
make random gauss vector, replacement for quasi-random defined in matlib.c
eigen-decompose-complex m
returns eigen decomposition from real square matrix
solve-non-zero-vector-from-det0-matrix m
solves non-zero-vector v from real square determinant-zero-matrix mat, when matv=O and det(mat)=0
concatenate-matrix-column &rest args
Concatenate matrix in column direction.
concatenate-matrix-row &rest args
Concatenate matrix in row direction.
concatenate-matrix-diagonal &rest args
Concatenate matrix in diagonal.
vector-variance vector-list
returns vector, each element represents variance of elements in the same index of vector within vector-list
covariance-matrix vector-list
make covariance matrix of given input vector-list
normalize-vector v &optional r (eps 1.000000e-20)
calculate normalize-vector #f(0 0 0)->#f(0 0 0).
pseudo-inverse-org m &optional ret winv mat-tmp-cr
sr-inverse-org mat &optional (k 1) me mat-tmp-cr mat-tmp-rr
eigen-decompose m
lms point-list
lms-estimate res point-
lms-error result point-list
lmeds point-list &key (num 5) (err-rate 0.3) (iteration) (ransac-threshold) (lms-func #’lms) (lmeds-error-func #’lmeds-error) (lms-estimate-func #’lms-estimate)
lmeds-error result point-list &key (lms-estimate-func #’lms-estimate)
lmeds-error-mat result mat &key (lms-estimate-func #’lms-estimate)
画像関数¶
read-image-file fname
read image of given fname. It returns instance of grayscale-image or color-image24.
write-image-file fname image::img
write img to given fname
read-png-file fname
write-png-file fname image::img