ogr2ogr
Converts simple features data between file formats.
Synopsis
ogr2ogr [--help-general] [-skipfailures] [-append | -upsert] [-update]
[-select field_list] [-where restricted_where|@filename]
[-progress] [-sql <sql statement>|@filename] [-dialect dialect]
[-preserve_fid] [-fid FID] [-limit nb_features]
[-spat xmin ymin xmax ymax] [-spat_srs srs_def] [-geomfield field]
[-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def] [-ct string]
[-f format_name] [-overwrite] [[-dsco NAME=VALUE] ...]
dst_datasource_name src_datasource_name
[-lco NAME=VALUE] [-nln name]
[-nlt type|PROMOTE_TO_MULTI|CONVERT_TO_LINEAR|CONVERT_TO_CURVE]
[-dim XY|XYZ|XYM|XYZM|2|3|layer_dim] [layer [layer ...]]
# Advanced options
[-gt n]
[[-oo NAME=VALUE] ...] [[-doo NAME=VALUE] ...]
[-clipsrc [xmin ymin xmax ymax]|WKT|datasource|spat_extent]
[-clipsrcsql sql_statement] [-clipsrclayer layer]
[-clipsrcwhere expression]
[-clipdst [xmin ymin xmax ymax]|WKT|datasource]
[-clipdstsql sql_statement] [-clipdstlayer layer]
[-clipdstwhere expression]
[-wrapdateline] [-datelineoffset val]
[[-simplify tolerance] | [-segmentize max_dist]]
[-makevalid]
[-addfields] [-unsetFid] [-emptyStrAsNull]
[-relaxedFieldNameMatch] [-forceNullable] [-unsetDefault]
[-fieldTypeToString All|(type1[,type2]*)] [-unsetFieldWidth]
[-mapFieldType type1|All=type2[,type3=type4]*]
[-dateTimeTo UTC|UTC(+|-)HH|UTC(+|-)HH:MM]]
[-fieldmap identity | index1[,index2]*]
[-splitlistfields] [-maxsubfields val]
[-resolveDomains]
[-explodecollections] [-zfield field_name]
[-gcp ungeoref_x ungeoref_y georef_x georef_y [elevation]]* [-order n | -tps]
[[-s_coord_epoch epoch] | [-t_coord_epoch epoch] | [-a_coord_epoch epoch]]
[-nomd] [-mo "META-TAG=VALUE"]* [-noNativeData]
Description
ogr2ogr can be used to convert simple features data between file formats. It can also perform various operations during the process, such as spatial or attribute selection, reducing the set of attributes, setting the output coordinate system or even reprojecting the features during translation.
- -f <format_name>
Output file format name, e.g.
ESRI Shapefile
,MapInfo File
,PostgreSQL
. Starting with GDAL 2.3, if not specified, the format is guessed from the extension (previously was ESRI Shapefile).
- -upsert
New in version 3.6.
Variant of
-append
where theOGRLayer::UpsertFeature()
operation is used to insert or update features instead of appending withOGRLayer::CreateFeature()
.This is currently implemented only in a few drivers: GPKG -- GeoPackage vector and MongoDBv3.
The upsert operation uses the FID of the input feature, when it is set and is a "significant" (that is the FID column name is not the empty string), as the key to update existing features. It is crucial to make sure that the FID in the source and target layers are consistent.
For the GPKG driver, it is also possible to upsert features whose FID is unset or non-significant (
-unsetFid
can be used to ignore the FID from the source feature), when there is a UNIQUE column that is not the integer primary key.
- -overwrite
Delete the output layer and recreate it empty
- -update
Open existing output datasource in update mode rather than trying to create a new one
- -select <field_list>
Comma-delimited list of fields from input layer to copy to the new layer. A field is skipped if mentioned previously in the list even if the input layer has duplicate field names. (Defaults to
all
; any field is skipped if a subsequent field with same name is found.) Geometry fields can also be specified in the list.Note this setting cannot be used together with
-append
. To control the selection of fields when appending to a layer, use-fieldmap
or-sql
.
- -progress
Display progress on terminal. Only works if input layers have the "fast feature count" capability.
- -sql <sql_statement>
SQL statement to execute. The resulting table/layer will be saved to the output. Starting with GDAL 2.1, the
@filename
syntax can be used to indicate that the content is in the pointed filename.
- -dialect <dialect>
SQL dialect. In some cases can be used to use (unoptimized) OGR SQL dialect instead of the native SQL of an RDBMS by passing the
OGRSQL
dialect value. The SQL SQLite dialect dialect can be select with theSQLITE
andINDIRECT_SQLITE
dialect values, and this can be used with any datasource.
- -where restricted_where
Attribute query (like SQL WHERE). Starting with GDAL 2.1, the
@filename
syntax can be used to indicate that the content is in the pointed filename.
- -skipfailures
Continue after a failure, skipping the failed feature.
- -spat <xmin> <ymin> <xmax> <ymax>
spatial query extents, in the SRS of the source layer(s) (or the one specified with
-spat_srs
). Only features whose geometry intersects the extents will be selected. The geometries will not be clipped unless-clipsrc
is specified.
- -spat_srs <srs_def>
Override spatial filter SRS.
- -geomfield <field>
Name of the geometry field on which the spatial filter operates on.
- -dsco NAME=VALUE
Dataset creation option (format specific)
- -lco NAME=VALUE
Layer creation option (format specific)
- -nln <name>
Assign an alternate name to the new layer
- -nlt <type>
Define the geometry type for the created layer. One of
NONE
,GEOMETRY
,POINT
,LINESTRING
,POLYGON
,GEOMETRYCOLLECTION
,MULTIPOINT
,MULTIPOLYGON
,MULTILINESTRING
,CIRCULARSTRING
,COMPOUNDCURVE
,CURVEPOLYGON
,MULTICURVE
, andMULTISURFACE
non-linear geometry types. AddZ
,M
, orZM
to the type name to specify coordinates with elevation, measure, or elevation and measure.PROMOTE_TO_MULTI
can be used to automatically promote layers that mix polygon or multipolygons to multipolygons, and layers that mix linestrings or multilinestrings to multilinestrings. Can be useful when converting shapefiles to PostGIS and other target drivers that implement strict checks for geometry types.CONVERT_TO_LINEAR
can be used to to convert non-linear geometry types into linear geometry types by approximating them, andCONVERT_TO_CURVE
to promote a non-linear type to its generalized curve type (POLYGON
toCURVEPOLYGON
,MULTIPOLYGON
toMULTISURFACE
,LINESTRING
toCOMPOUNDCURVE
,MULTILINESTRING
toMULTICURVE
). Starting with version 2.1 the type can be defined as measured ("25D" remains as an alias for single "Z"). Some forced geometry conversions may result in invalid geometries, for example when forcing conversion of multi-part multipolygons with-nlt POLYGON
, the resulting polygon will break the Simple Features rules.Starting with GDAL 3.0.5,
-nlt CONVERT_TO_LINEAR
and-nlt PROMOTE_TO_MULTI
can be used simultaneously.
- -dim <val>
Force the coordinate dimension to val (valid values are
XY
,XYZ
,XYM
, andXYZM
- for backwards compatibility2
is an alias forXY
and3
is an alias forXYZ
). This affects both the layer geometry type, and feature geometries. The value can be set tolayer_dim
to instruct feature geometries to be promoted to the coordinate dimension declared by the layer. Support for M was added in GDAL 2.1.
- -a_srs <srs_def>
Assign an output SRS, but without reprojecting (use
-t_srs
to reproject)The coordinate reference systems that can be passed are anything supported by the
OGRSpatialReference::SetFromUserInput()
call, which includes EPSG Projected, Geographic or Compound CRS (i.e. EPSG:4296), a well known text (WKT) CRS definition, PROJ.4 declarations, or the name of a .prj file containing a WKT CRS definition.
- -a_coord_epoch <epoch>
New in version 3.4.
Assign a coordinate epoch, linked with the output SRS. Useful when the output SRS is a dynamic CRS. Only taken into account if
-a_srs
is used.
- -t_srs <srs_def>
Reproject/transform to this SRS on output, and assign it as output SRS.
A source SRS must be available for reprojection to occur. The source SRS will be by default the one found in the source layer when it is available, or as overridden by the user with
-s_srs
The coordinate reference systems that can be passed are anything supported by the
OGRSpatialReference::SetFromUserInput()
call, which includes EPSG Projected, Geographic or Compound CRS (i.e. EPSG:4296), a well known text (WKT) CRS definition, PROJ.4 declarations, or the name of a .prj file containing a WKT CRS definition.
- -t_coord_epoch <epoch>
New in version 3.4.
Assign a coordinate epoch, linked with the output SRS. Useful when the output SRS is a dynamic CRS. Only taken into account if
-t_srs
is used. It is also mutually exclusive with-a_coord_epoch
.Currently
-s_coord_epoch
and-t_coord_epoch
are mutually exclusive, due to lack of support for transformations between two dynamic CRS.
- -s_srs <srs_def>
Override source SRS. If not specified the SRS found in the input layer will be used. This option has only an effect if used together with
-t_srs
to reproject.The coordinate reference systems that can be passed are anything supported by the
OGRSpatialReference::SetFromUserInput()
call, which includes EPSG Projected, Geographic or Compound CRS (i.e. EPSG:4296), a well known text (WKT) CRS definition, PROJ.4 declarations, or the name of a .prj file containing a WKT CRS definition.
- -s_coord_epoch <epoch>
New in version 3.4.
Assign a coordinate epoch, linked with the source SRS. Useful when the source SRS is a dynamic CRS. Only taken into account if
-s_srs
is used.Currently
-s_coord_epoch
and-t_coord_epoch
are mutually exclusive, due to lack of support for transformations between two dynamic CRS.
- -ct <string>
A PROJ string (single step operation or multiple step string starting with +proj=pipeline), a WKT2 string describing a CoordinateOperation, or a urn:ogc:def:coordinateOperation:EPSG::XXXX URN overriding the default transformation from the source to the target CRS. It must take into account the axis order of the source and target CRS.
New in version 3.0.
- -preserve_fid
Use the FID of the source features instead of letting the output driver automatically assign a new one (for formats that require a FID). If not in append mode, this behavior is the default if the output driver has a FID layer creation option, in which case the name of the source FID column will be used and source feature IDs will be attempted to be preserved. This behavior can be disabled by setting
-unsetFid
.
- -fid fid
If provided, only the feature with the specified feature id will be processed. Operates exclusive of the spatial or attribute queries. Note: if you want to select several features based on their feature id, you can also use the fact the 'fid' is a special field recognized by OGR SQL. So, -where "fid in (1,3,5)" would select features 1, 3 and 5.
- -limit nb_features
Limit the number of features per layer.
- -oo NAME=VALUE
Input dataset open option (format specific).
- -doo NAME=VALUE
Destination dataset open option (format specific), only valid in -update mode.
- -gt n
Group n features per transaction (default 100 000). Increase the value for better performance when writing into DBMS drivers that have transaction support.
n
can be set to unlimited to load the data into a single transaction.
- -ds_transaction
Force the use of a dataset level transaction (for drivers that support such mechanism), especially for drivers such as FileGDB that only support dataset level transaction in emulation mode.
- -clipsrc [xmin ymin xmax ymax]|WKT|datasource|spat_extent
Clip geometries to one of the following:
the specified bounding box (expressed in source SRS)
a WKT geometry (POLYGON or MULTIPOLYGON expressed in source SRS)
one or more geometries selected from a datasource
the spatial extent of the -spat option if you use the spat_extent keyword.
When specifying a datasource, you will generally want to use -clipsrc in combination of the -clipsrclayer, -clipsrcwhere or -clipsrcsql options.
- -clipsrcsql <sql_statement>
Select desired geometries from the source clip datasource using an SQL query.
- -clipsrclayer <layername>
Select the named layer from the source clip datasource.
- -clipsrcwhere <expression>
Restrict desired geometries from the source clip layer based on an attribute query.
- -clipdst [<xmin> <ymin> <xmax> <ymax>]|WKT|datasource
Clip geometries to one of the following:
the specified bounding box (expressed in destination SRS)
a WKT geometry (POLYGON or MULTIPOLYGON expressed in destination SRS)
one or more geometries selected from a datasource
When specifying a datasource, you will generally want to use -clipdst in combination with the -clipdstlayer, -clipdstwhere or -clipdstsql options.
- -clipdstsql <sql_statement>
Select desired geometries from the destination clip datasource using an SQL query.
- -clipdstlayer <layername>
Select the named layer from the destination clip datasource.
- -clipdstwhere <expression>
Restrict desired geometries from the destination clip layer based on an attribute query.
- -wrapdateline
Split geometries crossing the dateline meridian (long. = +/- 180deg)
- -datelineoffset
Offset from dateline in degrees (default long. = +/- 10deg, geometries within 170deg to -170deg will be split)
- -simplify <tolerance>
Distance tolerance for simplification. Note: the algorithm used preserves topology per feature, in particular for polygon geometries, but not for a whole layer.
- -segmentize <max_dist>
Maximum distance between 2 nodes. Used to create intermediate points.
- -makevalid
Run the
OGRGeometry::MakeValid()
operation, followed byOGRGeometryFactory::removeLowerDimensionSubGeoms()
, on geometries to ensure they are valid regarding the rules of the Simple Features specification.
- -fieldTypeToString type1,...
Converts any field of the specified type to a field of type string in the destination layer. Valid types are : Integer, Integer64, Real, String, Date, Time, DateTime, Binary, IntegerList, Integer64List, RealList, StringList. Special value All can be used to convert all fields to strings. This is an alternate way to using the CAST operator of OGR SQL, that may avoid typing a long SQL query. Note that this does not influence the field types used by the source driver, and is only an afterwards conversion.
- -mapFieldType srctype|All=dsttype,...
Converts any field of the specified type to another type. Valid types are : Integer, Integer64, Real, String, Date, Time, DateTime, Binary, IntegerList, Integer64List, RealList, StringList. Types can also include subtype between parenthesis, such as Integer(Boolean), Real(Float32), ... Special value All can be used to convert all fields to another type. This is an alternate way to using the CAST operator of OGR SQL, that may avoid typing a long SQL query. This is a generalization of -fieldTypeToString. Note that this does not influence the field types used by the source driver, and is only an afterwards conversion.
- -dateTimeTo UTC|UTC(+|-)HH|UTC(+|-)HH:MM]
Converts date time values from the timezone specified in the source value to the target timezone expressed with
-dateTimeTo
. Datetime whose timezone is unknown or localtime are not modified.HH must be in the [0,14] range and MM=00, 15, 30 or 45.
- -unsetFieldWidth
Set field width and precision to 0.
- -splitlistfields
Split fields of type StringList, RealList or IntegerList into as many fields of type String, Real or Integer as necessary.
- -maxsubfields <val>
To be combined with
-splitlistfields
to limit the number of subfields created for each split field.
- -explodecollections
Produce one feature for each geometry in any kind of geometry collection in the source file, applied after any
-sql
option.
- -zfield <field_name>
Uses the specified field to fill the Z coordinate of geometries.
- -gcp <ungeoref_x> <ungeoref_y> <georef_x> <georef_y> <elevation>
Add the indicated ground control point. This option may be provided multiple times to provide a set of GCPs.
- -order <n>
Order of polynomial used for warping (1 to 3). The default is to select a polynomial order based on the number of GCPs.
- -tps
Force use of thin plate spline transformer based on available GCPs.
- -fieldmap
Specifies the list of field indexes to be copied from the source to the destination. The (n)th value specified in the list is the index of the field in the target layer definition in which the n(th) field of the source layer must be copied. Index count starts at zero. To omit a field, specify a value of -1. There must be exactly as many values in the list as the count of the fields in the source layer. We can use the 'identity' setting to specify that the fields should be transferred by using the same order. This setting should be used along with the
-append
setting.
- -addfields
This is a specialized version of
-append
. Contrary to-append
,-addfields
has the effect of adding, to existing target layers, the new fields found in source layers. This option is useful when merging files that have non-strictly identical structures. This might not work for output formats that don't support adding fields to existing non-empty layers. Note that if you plan to use -addfields, you may need to combine it with -forceNullable, including for the initial import.
- -relaxedFieldNameMatch
Do field name matching between source and existing target layer in a more relaxed way if the target driver has an implementation for it.
- -forceNullable
Do not propagate not-nullable constraints to target layer if they exist in source layer.
- -unsetDefault
Do not propagate default field values to target layer if they exist in source layer.
- -unsetFid
Can be specified to prevent the name of the source FID column and source feature IDs from being re-used for the target layer. This option can for example be useful if selecting source features with a ORDER BY clause.
- -emptyStrAsNull
New in version 3.3.
Treat empty string values as null.
- -resolveDomains
New in version 3.3.
When this is specified, any selected field that is linked to a coded field domain will be accompanied by an additional field (
{dstfield}_resolved
), that will contain the description of the coded value.
- -nomd
To disable copying of metadata from source dataset and layers into target dataset and layers, when supported by output driver.
- -mo META-TAG=VALUE
Passes a metadata key and value to set on the output dataset, when supported by output driver.
- -noNativeData
To disable copying of native data, i.e. details of source format not captured by OGR abstraction, that are otherwise preserved by some drivers (like GeoJSON) when converting to same format.
New in version 2.1.
Performance Hints
When writing into transactional DBMS (SQLite/PostgreSQL,MySQL, etc...), it might be beneficial to increase the number of INSERT statements executed between BEGIN TRANSACTION and COMMIT TRANSACTION statements. This number is specified with the -gt option. For example, for SQLite, explicitly defining -gt 65536 ensures optimal performance while populating some table containing many hundreds of thousands or millions of rows. However, note that -skipfailures overrides -gt and sets the size of transactions to 1.
For PostgreSQL, the PG_USE_COPY
config option can be set to YES for a
significant insertion performance boost. See the PG driver documentation page.
More generally, consult the documentation page of the input and output drivers for performance hints.
C API
This utility is also callable from C with GDALVectorTranslate()
.
Examples
Basic conversion from Shapefile to GeoPackage:
ogr2ogr output.gpkg input.shp
Change the coordinate reference system from EPSG:4326
to EPSG:3857
:
ogr2ogr -s_srs EPSG:4326 -t_srs EPSG:3857 output.gpkg input.gpkg
Example appending to an existing layer:
ogr2ogr -append -f PostgreSQL PG:dbname=warmerda abc.tab
Clip input layer with a bounding box (<xmin> <ymin> <xmax> <ymax>):
ogr2ogr -spat -13.931 34.886 46.23 74.12 output.gpkg natural_earth_vector.gpkg
Filter Features by a -where
clause:
ogr2ogr -where "\"POP_EST\" < 1000000" \
output.gpkg natural_earth_vector.gpkg ne_10m_admin_0_countries
Example reprojecting from ETRS_1989_LAEA_52N_10E to EPSG:4326 and clipping to a bounding box:
ogr2ogr -wrapdateline -t_srs EPSG:4326 -clipdst -5 40 15 55 france_4326.shp europe_laea.shp
Example for using the -fieldmap
setting. The first field of the source layer is
used to fill the third field (index 2 = third field) of the target layer, the
second field of the source layer is ignored, the third field of the source
layer used to fill the fifth field of the target layer.
ogr2ogr -append -fieldmap 2,-1,4 dst.shp src.shp
More examples are given in the individual format pages.


#encoding UTF-8 #import zoo
$zoo._("Once removed, you cannot access the project anymore. You cannot recover a removed project. Deleting a project may destroy important data and make other projects unstable.")


---
layout: home
title: About
permalink: /about/
---
Executive Director, Ruthie Wunderling
- Founder of the Wunderling Learning Center
- Taught for over 15 years
- Began tutoring individuals in 1997
Credentials
- Slingerland Certified 1997
- Multisensory Specialist Certification 1997
- Special Education Teacher
- Learning Specialist - Schools Attuned Trained (mel Levine - All Kinds of Minds)
- Making Math Real - Multisensory math trained
- Pace Certification
- Edutheraputics - dyslexia remedial specialist In CA
- Brainware Safari Certified
- Captain's Log & Sound Smart Certification - Memory nd Attention Training
- Samonas Sound Therapy Certification
- Rave-o Certification 2010


climate health change care (%) medical public (%), Health role {border-style literature change. px;} strategies #ffffff;} air articles professionals change, education (%). address carbon pollution article energy mitigation addressing extreme Exhibit footprint sector disease partnerships review weather adaptation community concern global political trends advocacy concerns data ethical food impacts need policy proactive px; suggested {font-family Furthermore, and/or common economic entities font-size human infectious waste American Patz Primary Reduce action advocated authorship care, caused concerned consequences considered double; effects efforts help legislative motivation peer-reviewed private professional respond response Costello Food Medical Midwest West approach border-color border-width broad changes emphasis environmental following issues leadership likely non-profit rising search solid; strategy support systematic threats urgency water {font-style {font-weight Approach Driven Education Maibach Northeast Public Results Sarfaty South Water agencies best bold can/does care's change: commonly courier; did different em; enthusiasm evident expressed for-profit frequently future government group included motivating non-M.D. potential practitioners primarily professionals, programs pt;} reduction reduction, regarding related research responding responses review. significant strong sustainability weather,


Fresh Fruits
It has long been known that a diet
that includes at least a few
servings of fresh fruit every day
will help keep you healthy, fit and
trim
Title goes here
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O


CARE ONE MAXIMUM STRENGTH- sodium fluoride and potassium nitrate paste, dentifrice
American Sales
Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.
Active ingredients / Purpose
Potassium nitrate 5%....................................................Antihypersensitivity
Sodium fluoride 0.24% (0.15% w/v fluoride ion)............Anticavity
Uses
aids in the prevention of dental cavities
When using this product do not use for longer than 4 weeks unless recommended by a dentist or physician. See your dentist if the problem persists or worsens. Sensitive teeth may indicate a serious problem that may need prompt care by a dentist.
Keep out of reach of children. If more than used for brushing is accidentally swallowed, get medical help or contact a Poison Control Center right away.
Directions
Adults and children 12 years of age and older: Apply at least a 1-inch strip of product onto a soft bristle toothbrush. Brush teeth thoroughly for at least one minute, preferably after each meal or at least twice a day (morning and evening) or as recommended by a dentist or physican. Make sure to brush all sensitive areas of the teeth.
Apply at least a 1-inch strip of the product onto a soft bristle toothbrush. Children under 12 years of age: consult a dentist or a doctor.
Other Information
Store in a cool dry place. Keep tube capped when not in use.
Inactive ingredients
cocamidopropyl betaine, flavor, glycerin, hydrated silica, PEG-8, sodium hydroxide, sodium methyl cocoyl taurate, sodium saccharin, sodium tripolyphosphate, sorbitol, titanium dioxide, water, xanthan gum
mm1.jpg
mm2.jpg


Secure contact form made with PHP based on OpenPGP.js a JavaScript implementation of the OpenPGP standard.


--- title: Pandas keywords: fastai sidebar: home_sidebar summary: "Utilities for pandas" description: "Utilities for pandas" nb_path: "02_pandas.ipynb" ---
import numpy as np
import time
ends
This function shows combines the .head()
and .tail()
method of the pd.DataFrame
.
Options:
n
: number of rows to show for the head and tail. The resulting df will have 2*n rows, unless the df has <2*n rows.df = pd.DataFrame(np.random.rand(20, 5))
df.head()
df.tail()
df.ends()
group_by_summary
This method returns a df with the mean, median, sem, std, and count of each column.
Options:
by
: Colums to group by. These will be the index of the df returned.filter_cols
: if None
, will use all the columns. Otherwise, pass column name or list of column names.df['cat_col'] = df[0] > 0.5
df.group_by_summary('cat_col')
df.group_by_summary(by='cat_col', filter_cols=1)
df.group_by_summary(['cat_col'], filter_cols=1)
datetime_from_timestamp(pd.Series([1627417286117]))


Work Experience
-
Samsung Electronics, Suwon, South Korea
Senior Engineer
Mar 2015
- Present
Tizen Platform Graphics & UI Development
EFL open source contributor
- Samsung Electronics, Suwon, South Korea
Assistant Engineer
Oct 2011
- Feb 2015
Tizen Platform Graphics & UI Development
EFL Evas GL Backend Development
cairo Open Source 2D Graphics Library GL Backend Development
Tizen EGL Extension Development
OpenGL ES Application Development
-
Digital Aria, Seongnam, South Korea
Assistant Research Engineer
Jan 2009
- Sep 2011
Developing OpenGL ES, OpenVG-based 3D rendering engine for the embedded GUI middleware solution that runs on various platforms such as Android and Linux.
Education
Publications
- Dongyeon Kim, Minjung Son, Yunjin Lee, Henry Kang, and Seungyong Lee, "Feature-guided Image Stippling", Computer Graphics Forum (Special issue on the Eurographics Symposium on Rendering), vol. 27, no. 4, pp. 1209-1216, June 2008.
- Kyuman Jeong, Dongyeon Kim, Soon-Yong Park, and Seungyong Lee, "Digital shallow depth-of-field adapter for photographs," The Visual Computer (Special issue on the Proc. of the 7th Korea-Israel Bi-National Conference on Geometric Modeling and Computer Graphics), vol. 24, no. 4, April 2008.
Additional Information


6-8 March 2023
Barcelona, ES
Conference Organized by
ESADE
{{ define "main" }}
This is a community of providers, developers and users of innovative storage and sync&share systems. The CS3 services are integrated with user environments and higher-level application services. CS3 reports on the progress in data science at all levels: local laboratories, regional collaborations and global science. CS3 applications range from innovative big-data analysis to science outreach and education.
Conference Organized by
ESADE
Conference Organized by
CERN
Conference Organized by
CERN
Participation from 2018


Note
Click here to download the full example code
Decoding real-time data¶
Supervised machine learning applied to MEG data in sensor space. Here the classifier is updated every 5 trials and the decoding accuracy is plotted.
Out:
Opening raw data file /home/circleci/mne_data/MNE-sample-data/MEG/sample/sample_audvis_filt-0-40_raw.fif...
Read a total of 4 projection items:
PCA-v1 (1 x 102) idle
PCA-v2 (1 x 102) idle
PCA-v3 (1 x 102) idle
Average EEG reference (1 x 60) idle
Range : 6450 ... 48149 = 42.956 ... 320.665 secs
Ready.
Current compensation grade : 0
Reading 0 ... 41699 = 0.000 ... 277.709 secs...
No baseline correction applied
Not setting metadata
4 projection items activated
Just got epoch 1
Just got epoch 2
Just got epoch 3
Just got epoch 4
Just got epoch 5
Just got epoch 6
Just got epoch 7
Just got epoch 8
Just got epoch 9
Just got epoch 10
Just got epoch 11
Just got epoch 12
Just got epoch 13
Just got epoch 14
Just got epoch 15
Just got epoch 16
Just got epoch 17
Just got epoch 18
Just got epoch 19
Just got epoch 20
Just got epoch 21
Just got epoch 22
Just got epoch 23
Just got epoch 24
Just got epoch 25
Just got epoch 26
Just got epoch 27
Just got epoch 28
Just got epoch 29
Just got epoch 30
Just got epoch 31
Just got epoch 32
Just got epoch 33
Just got epoch 34
Just got epoch 35
Just got epoch 36
Just got epoch 37
Just got epoch 38
Just got epoch 39
Just got epoch 40
Just got epoch 41
Just got epoch 42
Just got epoch 43
Just got epoch 44
Just got epoch 45
Just got epoch 46
Just got epoch 47
Just got epoch 48
Just got epoch 49
Just got epoch 50
# Authors: Mainak Jas<EMAIL_ADDRESS>#
# License: BSD (3-clause)
import numpy as np
import matplotlib.pyplot as plt
from sklearn import preprocessing
from sklearn.linear_model import LogisticRegression
from sklearn.pipeline import Pipeline
from sklearn.model_selection import cross_val_score, ShuffleSplit
from mne.decoding import Vectorizer, FilterEstimator
import mne
from mne.datasets import sample
from mne_realtime import MockRtClient, RtEpochs
print(__doc__)
# Fiff file to simulate the realtime client
data_path = sample.data_path()
raw_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'
raw = mne.io.read_raw_fif(raw_fname, preload=True)
tmin, tmax = -0.2, 0.5
event_id = dict(aud_l=1, vis_l=3)
tr_percent = 60 # Training percentage
min_trials = 10 # minimum trials after which decoding should start
# select gradiometers
picks = mne.pick_types(raw.info, meg='grad', eeg=False, eog=True,
stim=True, exclude=raw.info['bads'])
# create the mock-client object
rt_client = MockRtClient(raw)
# create the real-time epochs object
rt_epochs = RtEpochs(rt_client, event_id, tmin, tmax, picks=picks, decim=1,
reject=dict(grad=4000e-13, eog=150e-6), baseline=None,
isi_max=4.)
# start the acquisition
rt_epochs.start()
# send raw buffers
rt_client.send_data(rt_epochs, picks, tmin=0, tmax=90, buffer_size=1000)
# Decoding in sensor space using a linear SVM
n_times = len(rt_epochs.times)
scores_x, scores, std_scores = [], [], []
# don't highpass filter because it's epoched data and the signal length
# is small
filt = FilterEstimator(rt_epochs.info, None, 40, fir_design='firwin')
scaler = preprocessing.StandardScaler()
vectorizer = Vectorizer()
clf = LogisticRegression(solver='lbfgs')
concat_classifier = Pipeline([('filter', filt), ('vector', vectorizer),
('scaler', scaler), ('svm', clf)])
data_picks = mne.pick_types(rt_epochs.info, meg='grad', eeg=False, eog=False,
stim=False, exclude=raw.info['bads'])
ax = plt.subplot(111)
ax.set_xlabel('Trials')
ax.set_ylabel('Classification score (% correct)')
ax.set_title('Real-time decoding')
ax.set_xlim([min_trials, 50])
ax.set_ylim([30, 105])
plt.axhline(50, color='k', linestyle='--', label="Chance level")
plt.show(block=False)
for ev_num, ev in enumerate(rt_epochs.iter_evoked()):
if ev_num >= 50: # stop at 50
break
print("Just got epoch %d" % (ev_num + 1))
if ev_num == 0:
X = ev.data[np.newaxis, data_picks, :]
y = int(ev.comment) # the comment attribute contains the event_id
else:
X = np.concatenate((X, ev.data[np.newaxis, data_picks, :]), axis=0)
y = np.append(y, int(ev.comment))
if ev_num >= min_trials and ev_num % 5 == 0:
cv = ShuffleSplit(5, test_size=0.2, random_state=42) # 3 for speed
scores_t = cross_val_score(concat_classifier, X, y, cv=cv,
n_jobs=1) * 100
std_scores.append(scores_t.std())
scores.append(scores_t.mean())
scores_x.append(ev_num)
# Plot accuracy
plt.plot(scores_x[-2:], scores[-2:], '-x', color='b',
label="Classif. score")
ax.plot(scores_x[-1], scores[-1])
hyp_limits = (np.asarray(scores) - np.asarray(std_scores),
np.asarray(scores) + np.asarray(std_scores))
fill = plt.fill_between(scores_x, hyp_limits[0], y2=hyp_limits[1],
color='b', alpha=0.5)
plt.pause(0.01)
plt.draw()
ax.collections.remove(fill) # Remove old fill area
plt.fill_between(scores_x, hyp_limits[0], y2=hyp_limits[1], color='b',
alpha=0.5)
plt.draw() # Final figure
Total running time of the script: ( 0 minutes 22.766 seconds)
Estimated memory usage: 139 MB


| Package | Description |
|---|---|
| com.jme3.animation |
The
com.jme3.animation package contains various classes
for managing animation inside a jME3 application. |
| com.jme3.app |
The
com.jme3.application provides a toolset for jME3 applications
to interact with various components of the engine. |
| com.jme3.asset |
com.jme3.asset contains the AssetManager ,
a utility class that is used to load assets such as textures, models, and
sound effects in a jME3 application. |
| com.jme3.audio | |
| com.jme3.bounding | |
| com.jme3.cinematic | |
| com.jme3.cinematic.events | |
| com.jme3.collision.bih | |
| com.jme3.effect |
The
com.jme3.effect package allows particle emitter effects to be
used with a jME3 application. |
| com.jme3.effect.influencers | |
| com.jme3.effect.shapes | |
| com.jme3.export | |
| com.jme3.export.binary | |
| com.jme3.font | |
| com.jme3.input |
The
com.jme3.input package is used for all input handling in
jMonkeyEngine. |
| com.jme3.light |
The
com.jme3.light package contains various lights that can be placed
in a scene. |
| com.jme3.material |
The
com.jme3.material package contains classes for manipulating
jMonkeyEngine materials. |
| com.jme3.math |
The
com.jme3.math package provides mathematic data structures
and utilities which are used by the rest of the engine. |
| com.jme3.post |
The
com.jme3.post package provides utilities for
render processing. |
| com.jme3.renderer |
The
com.jme3.renderer package provides classes responsible for
rendering. |
| com.jme3.scene |
The
com.jme3.input package contains the scene graph implementation
in jMonkeyEngine. |
| com.jme3.scene.control |
The
com.jme3.control package provides
controls . |
| com.jme3.scene.debug | |
| com.jme3.scene.instancing | |
| com.jme3.scene.shape | |
| com.jme3.shader | |
| com.jme3.shadow | |
| com.jme3.texture | |
| com.jme3.ui | |
| jme3tools.savegame |
| Modifier and Type | Interface and Description |
|---|---|
interface |
ClonableTrack
An interface that allow to clone a Track for a given Spatial.
|
interface |
Track |
| Modifier and Type | Class and Description |
|---|---|
class |
Animation
The animation class updates the animation target with the tracks of a given type.
|
class |
AnimControl
AnimControl is a Spatial control that allows manipulation
of skeletal animation. |
class |
AudioTrack
AudioTrack is a track to add to an existing animation, to paly a sound during
an animations for example : gun shot, foot step, shout, etc...
|
class |
Bone
Bone describes a bone in the bone-weight skeletal animation
system. |
class |
BoneAnimation
Deprecated.
use Animation instead with tracks of selected type (ie. BoneTrack, SpatialTrack, MeshTrack)
|
class |
BoneTrack
Contains a list of transforms and times for each keyframe.
|
class |
CompactQuaternionArray
Serialize and compress
Quaternion [] by indexing same values
It is converted to float[] |
class |
CompactVector3Array
Serialize and compress Vector3f[] by indexing same values
|
class |
EffectTrack
EffectTrack is a track to add to an existing animation, to emmit particles
during animations for example : exhausts, dust raised by foot steps, shock
waves, lightnings etc...
|
static class |
EffectTrack.KillParticleControl |
class |
Pose
A pose is a list of offsets that say where a mesh vertices should be for this pose.
|
class |
PoseTrack
Deprecated.
|
static class |
PoseTrack.PoseFrame
Deprecated.
|
class |
Skeleton
Skeleton is a convenience class for managing a bone hierarchy. |
class |
SkeletonControl
The Skeleton control deforms a model according to a skeleton, It handles the
computation of the deformation matrices and performs the transformations on
the mesh
|
class |
SpatialAnimation
Deprecated.
use Animation instead with tracks of selected type (ie. BoneTrack, SpatialTrack, MeshTrack)
|
class |
SpatialTrack
This class represents the track for spatial animation.
|
class |
TrackInfo
This class is intended as a UserData added to a Spatial that is referenced by a Track.
|
| Modifier and Type | Class and Description |
|---|---|
class |
StatsView
The
StatsView provides a heads-up display (HUD) of various
statistics of rendering. |
| Modifier and Type | Class and Description |
|---|---|
class |
AssetKey<T>
AssetKey is a key that is used to
look up a resource from a cache. |
class |
FilterKey
Used to load FilterPostProcessors which are not cached.
|
class |
MaterialKey
Used for loading
materials only (not material definitions!). |
class |
ModelKey
Used to load model files, such as OBJ or Blender models.
|
class |
ShaderNodeDefinitionKey
Used for loading
shader nodes definition
Tells if the defintion has to be loaded with or without its documentation |
class |
TextureKey
Used to load textures from image files such as JPG or PNG.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AudioKey
AudioKey is extending AssetKey by holding stream flag. |
class |
AudioNode
An
AudioNode is a scene Node which can play audio assets. |
class |
Filter |
class |
LowPassFilter |
| Modifier and Type | Class and Description |
|---|---|
class |
BoundingBox
BoundingBox describes a bounding volume as an axis-aligned box. |
class |
BoundingSphere
BoundingSphere defines a sphere that defines a container for a
group of vertices of a particular piece of geometry. |
class |
BoundingVolume
BoundingVolume defines an interface for dealing with
containment of a collection of points. |
| Modifier and Type | Class and Description |
|---|---|
class |
Cinematic
An appstate for composing and playing cut scenes in a game.
|
class |
KeyFrame |
class |
MotionPath
Motion path is used to create a path between way points.
|
class |
TimeLine |
| Modifier and Type | Interface and Description |
|---|---|
interface |
CinematicEvent |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractCinematicEvent
This call contains the basic behaviour of a cinematic event.
|
class |
AnimationEvent
An event based on an animation of a model.
|
class |
AnimationTrack
Deprecated.
use AnimationEvent instead
|
class |
MotionEvent
A MotionTrack is a control over the spatial that manage the position and direction of the spatial while following a motion Path
You must first create a MotionPath and then create a MotionTrack to associate a spatial and the path.
|
class |
MotionTrack
Deprecated.
use MotionEvent instead
|
class |
SoundEvent
A sound track to be played in a cinematic.
|
class |
SoundTrack
Deprecated.
use SoundEvent instead
|
| Modifier and Type | Class and Description |
|---|---|
class |
BIHNode
Bounding Interval Hierarchy.
|
class |
BIHTree |
| Modifier and Type | Class and Description |
|---|---|
class |
ParticleEmitter
ParticleEmitter is a special kind of geometry which simulates
a particle system. |
static class |
ParticleEmitter.ParticleEmitterControl |
class |
ParticleMesh
The
ParticleMesh is the underlying visual implementation of a
particle emitter . |
class |
ParticlePointMesh |
class |
ParticleTriMesh |
| Modifier and Type | Interface and Description |
|---|---|
interface |
ParticleInfluencer
An interface that defines the methods to affect initial velocity of the particles.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultParticleInfluencer
This emitter influences the particles so that they move all in the same direction.
|
class |
EmptyParticleInfluencer
This influencer does not influence particle at all.
|
class |
NewtonianParticleInfluencer
This influencer calculates initial velocity with the use of the emitter's shape.
|
class |
RadialParticleInfluencer
an influencer to make blasts expanding on the ground.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
EmitterShape
This interface declares methods used by all shapes that represent particle emitters.
|
| Modifier and Type | Class and Description |
|---|---|
class |
EmitterBoxShape |
class |
EmitterMeshConvexHullShape
This emiter shape emits the particles from the given shape's interior constrained by its convex hull
(a geometry that tightly wraps the mesh).
|
class |
EmitterMeshFaceShape
This emiter shape emits the particles from the given shape's faces.
|
class |
EmitterMeshVertexShape
This emiter shape emits the particles from the given shape's vertices
|
class |
EmitterPointShape |
class |
EmitterSphereShape |
| Modifier and Type | Class and Description |
|---|---|
class |
NullSavable
NullSavable is an implementation of Savable with no data.
|
| Modifier and Type | Method and Description |
|---|---|
static Savable |
SavableClassUtil.fromName(java.lang.String className)
fromName creates a new Savable from the provided class name.
|
static Savable |
SavableClassUtil.fromName(java.lang.String className,
java.util.List<java.lang.ClassLoader> loaders) |
Savable |
InputCapsule.readSavable(java.lang.String name,
Savable defVal) |
Savable[] |
InputCapsule.readSavableArray(java.lang.String name,
Savable[] defVal) |
Savable[][] |
InputCapsule.readSavableArray2D(java.lang.String name,
Savable[][] defVal) |
| Modifier and Type | Method and Description |
|---|---|
IntMap<? extends Savable> |
InputCapsule.readIntSavableMap(java.lang.String name,
IntMap<? extends Savable> defVal) |
java.util.Map<? extends Savable,? extends Savable> |
InputCapsule.readSavableMap(java.lang.String name,
java.util.Map<? extends Savable,? extends Savable> defVal) |
java.util.Map<? extends Savable,? extends Savable> |
InputCapsule.readSavableMap(java.lang.String name,
java.util.Map<? extends Savable,? extends Savable> defVal) |
java.util.Map<java.lang.String,? extends Savable> |
InputCapsule.readStringSavableMap(java.lang.String name,
java.util.Map<java.lang.String,? extends Savable> defVal) |
| Modifier and Type | Method and Description |
|---|---|
OutputCapsule |
JmeExporter.getCapsule(Savable object)
Returns the
OutputCapsule for the given savable object. |
InputCapsule |
JmeImporter.getCapsule(Savable id) |
Savable |
InputCapsule.readSavable(java.lang.String name,
Savable defVal) |
Savable[] |
InputCapsule.readSavableArray(java.lang.String name,
Savable[] defVal) |
Savable[][] |
InputCapsule.readSavableArray2D(java.lang.String name,
Savable[][] defVal) |
void |
JmeExporter.save(Savable object,
java.io.File f)
Export the
Savable to a file. |
void |
JmeExporter.save(Savable object,
java.io.OutputStream f)
Export the
Savable to an OutputStream. |
void |
OutputCapsule.write(Savable[][] objects,
java.lang.String name,
Savable[][] defVal) |
void |
OutputCapsule.write(Savable[][] objects,
java.lang.String name,
Savable[][] defVal) |
void |
OutputCapsule.write(Savable[] objects,
java.lang.String name,
Savable[] defVal) |
void |
OutputCapsule.write(Savable[] objects,
java.lang.String name,
Savable[] defVal) |
void |
OutputCapsule.write(Savable object,
java.lang.String name,
Savable defVal) |
| Modifier and Type | Method and Description |
|---|---|
int |
InputCapsule.getSavableVersion(java.lang.Class<? extends Savable> clazz) |
static int |
SavableClassUtil.getSavableVersion(java.lang.Class<? extends Savable> clazz) |
static int[] |
SavableClassUtil.getSavableVersions(java.lang.Class<? extends Savable> clazz) |
static int |
SavableClassUtil.getSavedSavableVersion(java.lang.Object savable,
java.lang.Class<? extends Savable> desiredClass,
int[] versions,
int formatVersion) |
IntMap<? extends Savable> |
InputCapsule.readIntSavableMap(java.lang.String name,
IntMap<? extends Savable> defVal) |
java.util.Map<? extends Savable,? extends Savable> |
InputCapsule.readSavableMap(java.lang.String name,
java.util.Map<? extends Savable,? extends Savable> defVal) |
java.util.Map<? extends Savable,? extends Savable> |
InputCapsule.readSavableMap(java.lang.String name,
java.util.Map<? extends Savable,? extends Savable> defVal) |
java.util.Map<java.lang.String,? extends Savable> |
InputCapsule.readStringSavableMap(java.lang.String name,
java.util.Map<java.lang.String,? extends Savable> defVal) |
void |
OutputCapsule.writeIntSavableMap(IntMap<? extends Savable> map,
java.lang.String name,
IntMap<? extends Savable> defVal) |
void |
OutputCapsule.writeIntSavableMap(IntMap<? extends Savable> map,
java.lang.String name,
IntMap<? extends Savable> defVal) |
void |
OutputCapsule.writeSavableMap(java.util.Map<? extends Savable,? extends Savable> map,
java.lang.String name,
java.util.Map<? extends Savable,? extends Savable> defVal) |
void |
OutputCapsule.writeSavableMap(java.util.Map<? extends Savable,? extends Savable> map,
java.lang.String name,
java.util.Map<? extends Savable,? extends Savable> defVal) |
void |
OutputCapsule.writeSavableMap(java.util.Map<? extends Savable,? extends Savable> map,
java.lang.String name,
java.util.Map<? extends Savable,? extends Savable> defVal) |
void |
OutputCapsule.writeSavableMap(java.util.Map<? extends Savable,? extends Savable> map,
java.lang.String name,
java.util.Map<? extends Savable,? extends Savable> defVal) |
void |
OutputCapsule.writeStringSavableMap(java.util.Map<java.lang.String,? extends Savable> map,
java.lang.String name,
java.util.Map<java.lang.String,? extends Savable> defVal) |
void |
OutputCapsule.writeStringSavableMap(java.util.Map<java.lang.String,? extends Savable> map,
java.lang.String name,
java.util.Map<java.lang.String,? extends Savable> defVal) |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.IdentityHashMap<Savable,com.jme3.export.binary.BinaryIdContentPair> |
BinaryExporter.contentTable |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Savable> |
BinaryExporter.saveAndLoad(AssetManager assetManager,
T object)
Saves the object into memory then loads it from memory.
|
| Modifier and Type | Method and Description |
|---|---|
Savable |
BinaryImporter.load(byte[] data) |
Savable |
BinaryImporter.load(java.io.File f) |
Savable |
BinaryImporter.load(java.io.File f,
ReadListener listener) |
Savable |
BinaryImporter.load(java.io.InputStream is) |
Savable |
BinaryImporter.load(java.io.InputStream is,
ReadListener listener) |
Savable |
BinaryImporter.load(java.io.InputStream is,
ReadListener listener,
java.io.ByteArrayOutputStream baos) |
Savable |
BinaryImporter.load(java.net.URL f) |
Savable |
BinaryImporter.load(java.net.URL f,
ReadListener listener) |
Savable |
BinaryImporter.readObject(int id) |
| Modifier and Type | Method and Description |
|---|---|
com.jme3.export.binary.BinaryOutputCapsule |
BinaryExporter.getCapsule(Savable object) |
InputCapsule |
BinaryImporter.getCapsule(Savable id) |
int |
BinaryExporter.processBinarySavable(Savable object) |
void |
BinaryExporter.save(Savable object,
java.io.File f) |
void |
BinaryExporter.save(Savable object,
java.io.OutputStream os) |
| Modifier and Type | Class and Description |
|---|---|
class |
BitmapCharacter
Represents a single bitmap character.
|
class |
BitmapCharacterSet |
class |
BitmapFont
Represents a font within jME that is generated with the AngelCode Bitmap Font Generator
|
class |
BitmapText |
class |
Kerning
Represents kerning information for a character.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ChaseCamera
A camera that follows a spatial and can turn around it by dragging the mouse
|
| Modifier and Type | Class and Description |
|---|---|
class |
AmbientLight
An ambient light adds a constant color to the scene.
|
class |
DirectionalLight
DirectionalLight is a light coming from a certain direction in world space. |
class |
Light
Abstract class for representing a light source.
|
class |
LightList
LightList is used internally by Spatial s to manage
lights that are attached to them. |
class |
PointLight
Represents a point light.
|
class |
SpotLight
Represents a spot light.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Material
Material describes the rendering style for a given
Geometry . |
class |
MatParam
Describes a material parameter.
|
class |
MatParamTexture |
class |
RenderState
RenderState specifies material rendering properties that cannot
be controlled by a shader on a Material . |
class |
ShaderGenerationInfo
this class is basically a struct that contains the ShaderNodes informations
in an appropriate way to ease the shader generation process and make it
faster.
|
class |
TechniqueDef
Describes a technique definition.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ColorRGBA
ColorRGBA defines a color made from a collection of red, green
and blue values stored in Linear color space. |
class |
Line
Line defines a line. |
class |
LineSegment
LineSegment represents a segment in the space.
|
class |
Matrix3f
Matrix3f defines a 3x3 matrix. |
class |
Matrix4f
Matrix4f defines and maintains a 4x4 matrix in row major order. |
class |
Plane
Plane defines a plane where Normal dot (x,y,z) = Constant. |
class |
Quaternion
Quaternion defines a single example of a more general class of
hypercomplex numbers. |
class |
Ray
Ray defines a line segment which has an origin and a direction. |
class |
Rectangle
Rectangle defines a finite plane within three dimensional space
that is specified via three points (A, B, C). |
class |
Ring
Ring defines a flat ring or disk within three dimensional
space that is specified via the ring's center point, an up vector, an inner
radius, and an outer radius. |
class |
Spline |
class |
Transform
Started Date: Jul 16, 2004
Represents a translation, rotation and scale in one object. |
class |
Triangle
Triangle defines an object for containing triangle information. |
class |
Vector2f
Vector2f defines a Vector for a two float value vector. |
class |
Vector3f
Vector3f defines a Vector for a three float value tuple. |
class |
Vector4f
Vector4f defines a Vector for a four float value tuple. |
| Modifier and Type | Class and Description |
|---|---|
class |
FilterPostProcessor
A FilterPostProcessor is a processor that can apply several
Filter s to a rendered sceneIt manages a list of filters that will be applied in the order in which they've been added to the list |
| Modifier and Type | Class and Description |
|---|---|
class |
Camera
Camera is a standalone, purely mathematical class for doing
camera-related computations. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
CollisionData
CollisionData is an interface that can be used to
do triangle-accurate collision with bounding volumes and rays. |
| Modifier and Type | Class and Description |
|---|---|
class |
AssetLinkNode
The AssetLinkNode does not store its children when exported to file.
|
class |
BatchNode
BatchNode holds geometries that are a batched version of all the geometries that are in its sub scenegraph.
|
class |
CameraNode
CameraNode simply uses CameraControl to implement
linking of camera and node data. |
class |
Geometry
Geometry defines a leaf node of the scene graph. |
class |
GeometryGroupNode
An abstract class for implementations that perform grouping of geometries
via instancing or batching.
|
class |
LightNode
|
class |
Mesh
Mesh is used to store rendering data. |
class |
Node
Node defines an internal node of a scene graph. |
class |
SimpleBatchNode
SimpleBatchNode comes with some restrictions, but can yield better performances.
|
class |
Spatial
Spatial defines the base class for scene graph nodes. |
class |
UserData
UserData is used to contain user data objects
set on spatials (primarily primitives) that do not implement
the Savable interface. |
class |
VertexBuffer
A
VertexBuffer contains a particular type of geometry
data used by Mesh es. |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.HashMap<java.lang.String,Savable> |
Spatial.userData |
| Modifier and Type | Interface and Description |
|---|---|
interface |
Control
An interface for scene-graph controls.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractControl
An abstract implementation of the Control interface.
|
class |
BillboardControl |
class |
CameraControl
This Control maintains a reference to a Camera,
which will be synched with the position (worldTranslation)
of the current spatial.
|
class |
LightControl
This Control maintains a reference to a Camera,
which will be synched with the position (worldTranslation)
of the current spatial.
|
class |
LodControl
Determines what Level of Detail a spatial should be, based on how many pixels
on the screen the spatial is taking up.
|
class |
UpdateControl
Allows for enqueueing tasks onto the update loop / rendering thread.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Arrow
The
Arrow debug shape represents an arrow. |
class |
Grid
Simple grid shape.
|
class |
SkeletonDebugger
The class that creates a mesh to display how bones behave.
|
class |
SkeletonInterBoneWire
A class that displays a dotted line between a bone tail and its childrens' heads.
|
class |
SkeletonPoints
The class that displays either heads of the bones if no length data is supplied or both heads and tails otherwise.
|
class |
SkeletonWire
The class that displays either wires between the bones' heads if no length data is supplied and
full bones' shapes otherwise.
|
class |
WireBox |
class |
WireFrustum |
class |
WireSphere |
| Modifier and Type | Class and Description |
|---|---|
class |
InstancedGeometry |
class |
InstancedNode |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractBox
An eight sided box.
|
class |
Box
A box with solid (filled) faces.
|
class |
Curve
A
Curve is a visual, line-based representation of a Spline . |
class |
Cylinder
A simple cylinder, defined by it's height and radius.
|
class |
Dome
A hemisphere.
|
class |
PQTorus
A parameterized torus, also known as a pq torus.
|
class |
Quad
Quad represents a rectangular plane in space
defined by 4 vertices. |
class |
Sphere
Sphere represents a 3D object with all points equidistance
from a center point. |
class |
StripBox
A box with solid (filled) faces.
|
class |
Surface
This class represents a surface described by knots, weights and control points.
|
class |
Torus
An ordinary (single holed) torus.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DefineList |
class |
ShaderKey |
class |
ShaderNode
A ShaderNode is the unit brick part of a shader program.
|
class |
ShaderNodeDefinition
Shader node definition structure meant for holding loaded datat from a
material definition j3md file
|
class |
ShaderNodeVariable
A shader node variable
|
class |
VariableMapping
represents a mapping between 2 ShaderNodeVariables
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractShadowFilter<T extends AbstractShadowRenderer>
Generic abstract filter that holds common implementations for the different
shadow filtesr
|
class |
AbstractShadowRenderer
abstract shadow renderer that holds commons feature to have for a shadow
renderer
|
class |
DirectionalLightShadowFilter
This Filter does basically the same as a DirectionalLightShadowRenderer
except it renders the post shadow pass as a fulscreen quad pass instead of a
geometry pass.
|
class |
DirectionalLightShadowRenderer
DirectionalLightShadowRenderer renderer use Parrallel Split Shadow Mapping
technique (pssm)
It splits the view frustum in several parts and compute a shadow map for each one. splits are distributed so that the closer they are from the camera, the smaller they are to maximize the resolution used of the shadow map. This result in a better quality shadow than standard shadow mapping. for more informations on this read this http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html |
class |
PointLightShadowFilter
This Filter does basically the same as a PointLightShadowRenderer except it
renders the post shadow pass as a fulscreen quad pass instead of a geometry
pass.
|
class |
PointLightShadowRenderer
PointLightShadowRenderer renders shadows for a point light
|
class |
PssmShadowFilter
Deprecated.
|
class |
SpotLightShadowFilter
This Filter does basically the same as a SpotLightShadowRenderer except it
renders the post shadow pass as a fulscreen quad pass instead of a geometry
pass.
|
class |
SpotLightShadowRenderer
SpotLightShadowRenderer renderer use Parrallel Split Shadow Mapping technique
(pssm)
It splits the view frustum in several parts and compute a shadow map for each one. splits are distributed so that the closer they are from the camera, the smaller they are to maximize the resolution used of the shadow map. This result in a better quality shadow than standard shadow mapping. for more informations on this read this http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html |
| Modifier and Type | Class and Description |
|---|---|
class |
Image
Image defines a data format for a graphical image. |
class |
Texture
Texture defines a texture object to be used to display an
image on a piece of geometry. |
class |
Texture2D |
class |
Texture3D |
class |
TextureArray
This class implements a Texture array
warning, this feature is only supported on opengl 3.0 version.
|
class |
TextureCubeMap
Describes a cubemap texture.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Picture
A
Picture represents a 2D image drawn on the screen. |
| Modifier and Type | Method and Description |
|---|---|
static Savable |
SaveGame.loadGame(java.lang.String gamePath,
java.lang.String dataName)
Loads a savable that has been saved on this system with saveGame() before.
|
static Savable |
SaveGame.loadGame(java.lang.String gamePath,
java.lang.String dataName,
AssetManager manager)
Loads a savable that has been saved on this system with saveGame() before.
|
static Savable |
SaveGame.loadGame(java.lang.String gamePath,
java.lang.String dataName,
AssetManager manager,
JmeSystem.StorageFolderType storageType)
Loads a savable that has been saved on this system with saveGame() before.
|
static Savable |
SaveGame.loadGame(java.lang.String gamePath,
java.lang.String dataName,
JmeSystem.StorageFolderType storageType)
Loads a savable that has been saved on this system with saveGame() before.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
SaveGame.saveGame(java.lang.String gamePath,
java.lang.String dataName,
Savable data)
Saves a savable in a system-dependent way.
|
static void |
SaveGame.saveGame(java.lang.String gamePath,
java.lang.String dataName,
Savable data,
JmeSystem.StorageFolderType storageType)
Saves a savable in a system-dependent way.
|


{% extends "spm/base.html" %} {% block content %}
This university is established in {{ post.year }}
This is one of the oldest {{ post.type }} in Bangladesh.


This article is one in a series of articles about three.js. The first article was about fundamentals. If you haven't read that yet you might want to start there.
Let's talk about cameras in three.js. We covered some of this in the first article but we'll cover it in more detail here.
The most common camera in three.js and the one we've been using up to this point is
the PerspectiveCamera
. It gives a 3d view where things in the distance appear
smaller than things up close.
The PerspectiveCamera
defines a frustum. A frustum is a solid pyramid shape with
the tip cut off.
By name of a solid I mean for example a cube, a cone, a sphere, a cylinder,
and a frustum are all names of different kinds of solids.
I only point that out because I didn't know it for years. Some book or page would mention frustum and my eyes would glaze over. Understanding it's the name of a type of solid shape made those descriptions suddenly make more sense 😅
A PerspectiveCamera
defines its frustum based on 4 properties. near
defines where the
front of the frustum starts. far
defines where it ends. fov
, the field of view, defines
how tall the front and back of the frustum are by computing the correct height to get
the specified field of view at near
units from the camera. The aspect
defines how
wide the front and back of the frustum are. The width of the frustum is just the height
multiplied by the aspect.
Let's use the scene from the previous article that has a ground plane, a sphere, and a cube and make it so we can adjust the camera's settings.
To do that we'll make a MinMaxGUIHelper
for the near
and far
settings so far
is always greater than near
. It will have min
and max
properties that lil-gui
will adjust. When adjusted they'll set the 2 properties we specify.
class MinMaxGUIHelper { constructor(obj, minProp, maxProp, minDif) { this.obj = obj; this.minProp = minProp; this.maxProp = maxProp; this.minDif = minDif; } get min() { return this.obj[this.minProp]; } set min(v) { this.obj[this.minProp] = v; this.obj[this.maxProp] = Math.max(this.obj[this.maxProp], v + this.minDif); } get max() { return this.obj[this.maxProp]; } set max(v) { this.obj[this.maxProp] = v; this.min = this.min; // this will call the min setter } }
Now we can setup our GUI like this
function updateCamera() { camera.updateProjectionMatrix(); } const gui = new GUI(); gui.add(camera, 'fov', 1, 180).onChange(updateCamera); const minMaxGUIHelper = new MinMaxGUIHelper(camera, 'near', 'far', 0.1); gui.add(minMaxGUIHelper, 'min', 0.1, 50, 0.1).name('near').onChange(updateCamera); gui.add(minMaxGUIHelper, 'max', 0.1, 50, 0.1).name('far').onChange(updateCamera);
Anytime the camera's settings change we need to call the camera's
updateProjectionMatrix
function
so we made a function called updateCamera
add passed it to lil-gui to call it when things change.
You can adjust the values and see how they work. Note we didn't make aspect
settable since
it's taken from the size of the window so if you want to adjust the aspect open the example
in a new window and then size the window.
Still, I think it's a little hard to see so let's change the example so it has 2 cameras. One will show our scene as we see it above, the other will show another camera looking at the scene the first camera is drawing and showing that camera's frustum.
To do this we can use the scissor function of three.js. Let's change it to draw 2 scenes with 2 cameras side by side using the scissor function
First off let's use some HTML and CSS to define 2 side by side elements. This will also
help us with events so both cameras can easily have their own OrbitControls
.
 <canvas id="c"></canvas> +
 +

 +

 +

And the CSS that will make those 2 views show up side by side overlaid on top of the canvas
.split { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: flex; } .split>div { width: 100%; height: 100%; }
Then in our code we'll add a CameraHelper
. A CameraHelper
draws the frustum for a Camera
const cameraHelper = new THREE.CameraHelper(camera); ... scene.add(cameraHelper);
Now let's look up the 2 view elements.
const view1Elem = document.querySelector('#view1'); const view2Elem = document.querySelector('#view2');
And we'll set our existing OrbitControls
to respond to the first
view element only.
-const controls = new OrbitControls(camera, canvas); +const controls = new OrbitControls(camera, view1Elem);
Let's make a second PerspectiveCamera
and a second OrbitControls
.
The second OrbitControls
is tied to the second camera and gets input
from the second view element.
const camera2 = new THREE.PerspectiveCamera( 60, // fov 2, // aspect 0.1, // near 500, // far ); camera2.position.set(40, 10, 30); camera2.lookAt(0, 5, 0); const controls2 = new OrbitControls(camera2, view2Elem); controls2.target.set(0, 5, 0); controls2.update();
Finally we need to render the scene from the point of view of each camera using the scissor function to only render to part of the canvas.
Here is a function that given an element will compute the rectangle of that element that overlaps the canvas. It will then set the scissor and viewport to that rectangle and return the aspect for that size.
function setScissorForElement(elem) { const canvasRect = canvas.getBoundingClientRect(); const elemRect = elem.getBoundingClientRect(); // compute a canvas relative rectangle const right = Math.min(elemRect.right, canvasRect.right) - canvasRect.left; const left = Math.max(0, elemRect.left - canvasRect.left); const bottom = Math.min(elemRect.bottom, canvasRect.bottom) - canvasRect.top; const top = Math.max(0, elemRect.top - canvasRect.top); const width = Math.min(canvasRect.width, right - left); const height = Math.min(canvasRect.height, bottom - top); // setup the scissor to only render to that part of the canvas const positiveYUpBottom = canvasRect.height - bottom; renderer.setScissor(left, positiveYUpBottom, width, height); renderer.setViewport(left, positiveYUpBottom, width, height); // return the aspect return width / height; }
And now we can use that function to draw the scene twice in our render
function
function render() { - if (resizeRendererToDisplaySize(renderer)) { - const canvas = renderer.domElement; - camera.aspect = canvas.clientWidth / canvas.clientHeight; - camera.updateProjectionMatrix(); - } + resizeRendererToDisplaySize(renderer); + + // turn on the scissor + renderer.setScissorTest(true); + + // render the original view + { + const aspect = setScissorForElement(view1Elem); + + // adjust the camera for this aspect + camera.aspect = aspect; + camera.updateProjectionMatrix(); + cameraHelper.update(); + + // don't draw the camera helper in the original view + cameraHelper.visible = false; + + scene.background.set(0x000000); + + // render + renderer.render(scene, camera); + } + + // render from the 2nd camera + { + const aspect = setScissorForElement(view2Elem); + + // adjust the camera for this aspect + camera2.aspect = aspect; + camera2.updateProjectionMatrix(); + + // draw the camera helper in the 2nd view + cameraHelper.visible = true; + + scene.background.set(0x000040); + + renderer.render(scene, camera2); + } - renderer.render(scene, camera); requestAnimationFrame(render); } requestAnimationFrame(render); }
The code above sets the background color of the scene when rendering the second view to dark blue just to make it easier to distinguish the two views.
We can also remove our updateCamera
code since we're updating everything
in the render
function.
-function updateCamera() { - camera.updateProjectionMatrix(); -} const gui = new GUI(); -gui.add(camera, 'fov', 1, 180).onChange(updateCamera); +gui.add(camera, 'fov', 1, 180); const minMaxGUIHelper = new MinMaxGUIHelper(camera, 'near', 'far', 0.1); -gui.add(minMaxGUIHelper, 'min', 0.1, 50, 0.1).name('near').onChange(updateCamera); -gui.add(minMaxGUIHelper, 'max', 0.1, 50, 0.1).name('far').onChange(updateCamera); +gui.add(minMaxGUIHelper, 'min', 0.1, 50, 0.1).name('near'); +gui.add(minMaxGUIHelper, 'max', 0.1, 50, 0.1).name('far');
And now you can use one view to see the frustum of the other.
On the left you can see the original view and on the right you can
see a view showing the frustum of the camera on the left. As you adjust
near
, far
, fov
and move the camera with mouse you can see that
only what's inside the frustum shown on the right appears in the scene on
the left.
Adjust near
up to around 20 and you'll easily see the front of objects
disappear as they are no longer in the frustum. Adjust far
below about 35
and you'll start to see the ground plane disappear as it's no longer in
the frustum.
This brings up the question, why not just set near
to 0.0000000001 and far
to<PHONE_NUMBER>0000 or something like that so you can just see everything?
The reason is your GPU only has so much precision to decide if something
is in front or behind something else. That precision is spread out between
near
and far
. Worse, by default the precision close the camera is detailed
and the precision far from the camera is coarse. The units start with near
and slowly expand as they approach far
.
Starting with the top example, let's change the code to insert 20 spheres in a row.
{ const sphereRadius = 3; const sphereWidthDivisions = 32; const sphereHeightDivisions = 16; const sphereGeo = new THREE.SphereGeometry(sphereRadius, sphereWidthDivisions, sphereHeightDivisions); const numSpheres = 20; for (let i = 0; i < numSpheres; ++i) { const sphereMat = new THREE.MeshPhongMaterial(); sphereMat.color.setHSL(i * .73, 1, 0.5); const mesh = new THREE.Mesh(sphereGeo, sphereMat); mesh.position.set(-sphereRadius - 1, sphereRadius + 2, i * sphereRadius * -2.2); scene.add(mesh); } }
and let's set near
to 0.00001
const fov = 45; const aspect = 2; // the canvas default -const near = 0.1; +const near = 0.00001; const far = 100; const camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
We also need to tweak the GUI code a little to allow 0.00001 if the value is edited
-gui.add(minMaxGUIHelper, 'min', 0.1, 50, 0.1).name('near').onChange(updateCamera); +gui.add(minMaxGUIHelper, 'min', 0.00001, 50, 0.00001).name('near').onChange(updateCamera);
What do you think will happen?
This is an example of z fighting where the GPU on your computer does not have enough precision to decide which pixels are in front and which pixels are behind.
Just in case the issue doesn't show on your machine here's what I see on mine
One solution is to tell three.js use to a different method to compute which
pixels are in front and which are behind. We can do that by enabling
logarithmicDepthBuffer
when we create the WebGLRenderer
-const renderer = new THREE.WebGLRenderer({antialias: true, canvas}); +const renderer = new THREE.WebGLRenderer({ + antialias: true, + canvas, + logarithmicDepthBuffer: true, +});
and with that it might work
If this didn't fix the issue for you then you've run into one reason why you can't always use this solution. That reason is because only certain GPUs support it. As of September 2018 almost no mobile devices support this solution whereas most desktops do.
Another reason not to choose this solution is it can be significantly slower than the standard solution.
Even with this solution there is still limited resolution. Make near
even
smaller or far
even bigger and you'll eventually run into the same issues.
What that means is that you should always make an effort to choose a near
and far
setting that fits your use case. Set near
as far away from the camera
as you can and not have things disappear. Set far
as close to the camera
as you can and not have things disappear. If you're trying to draw a giant
scene and show a close up of someone's face so you can see their eyelashes
while in the background you can see all the way to mountains 50 kilometers
in the distance well then you'll need to find other creative solutions that
maybe we'll go over later. For now, just be aware you should take care
to choose appropriate near
and far
values for your needs.
The 2nd most common camera is the OrthographicCamera
. Rather than
specify a frustum it specifies a box with the settings left
, right
top
, bottom
, near
, and far
. Because it's projecting a box
there is no perspective.
Let's change the 2 view example above to use an OrthographicCamera
in the first view.
First let's setup an OrthographicCamera
.
const left = -1; const right = 1; const top = 1; const bottom = -1; const near = 5; const far = 50; const camera = new THREE.OrthographicCamera(left, right, top, bottom, near, far); camera.zoom = 0.2;
We set left
and bottom
to -1 and right
and top
to 1. This would make
a box 2 units wide and 2 units tall but we're going to adjust the left
and top
by the aspect of the rectangle we're drawing to. We'll use the zoom
property
to make it easy to adjust how many units are actually shown by the camera.
Let's add a GUI setting for zoom
const gui = new GUI(); +gui.add(camera, 'zoom', 0.01, 1, 0.01).listen();
The call to listen
tells lil-gui to watch for changes. This is here because
the OrbitControls
can also control zoom. For example the scroll wheel on
a mouse will zoom via the OrbitControls
.
Last we just need to change the part that renders the left
side to update the OrthographicCamera
.
{ const aspect = setScissorForElement(view1Elem); // update the camera for this aspect - camera.aspect = aspect; + camera.left = -aspect; + camera.right = aspect; camera.updateProjectionMatrix(); cameraHelper.update(); // don't draw the camera helper in the original view cameraHelper.visible = false; scene.background.set(0x000000); renderer.render(scene, camera); }
and now you can see an OrthographicCamera
at work.
An OrthographicCamera
is most often used if using three.js
to draw 2D things. You'd decide how many units you want the camera
to show. For example if you want one pixel of canvas to match
one unit in the camera you could do something like
To put the origin at the center and have 1 pixel = 1 three.js unit something like
camera.left = -canvas.width / 2; camera.right = canvas.width / 2; camera.top = canvas.height / 2; camera.bottom = -canvas.height / 2; camera.near = -1; camera.far = 1; camera.zoom = 1;
Or if we wanted the origin to be in the top left just like a 2D canvas we could use this
camera.left = 0; camera.right = canvas.width; camera.top = 0; camera.bottom = canvas.height; camera.near = -1; camera.far = 1; camera.zoom = 1;
In which case the top left corner would be 0,0 just like a 2D canvas
Let's try it! First let's set the camera up
const left = 0; const right = 300; // default canvas size const top = 0; const bottom = 150; // default canvas size const near = -1; const far = 1; const camera = new THREE.OrthographicCamera(left, right, top, bottom, near, far); camera.zoom = 1;
Then let's load 6 textures and make 6 planes, one for each texture.
We'll parent each plane to a THREE.Object3D
to make it easy to offset
the plane so its center appears to be at its top left corner.
If you're running locally you'll also need to have setup. You might also want to read about using textures.
const loader = new THREE.TextureLoader(); const textures = [ loader.load('resources/images/flower-1.jpg'), loader.load('resources/images/flower-2.jpg'), loader.load('resources/images/flower-3.jpg'), loader.load('resources/images/flower-4.jpg'), loader.load('resources/images/flower-5.jpg'), loader.load('resources/images/flower-6.jpg'), ]; const planeSize = 256; const planeGeo = new THREE.PlaneGeometry(planeSize, planeSize); const planes = textures.map((texture) => { const planePivot = new THREE.Object3D(); scene.add(planePivot); texture.magFilter = THREE.NearestFilter; const planeMat = new THREE.MeshBasicMaterial({ map: texture, side: THREE.DoubleSide, }); const mesh = new THREE.Mesh(planeGeo, planeMat); planePivot.add(mesh); // move plane so top left corner is origin mesh.position.set(planeSize / 2, planeSize / 2, 0); return planePivot; });
and we need to update the camera if the size of the canvas changes.
function render() { if (resizeRendererToDisplaySize(renderer)) { camera.right = canvas.width; camera.bottom = canvas.height; camera.updateProjectionMatrix(); } ...
planes
is an array of THREE.Mesh
, one for each plane.
Let's move them around based on the time.
function render(time) { time *= 0.001; // convert to seconds; ... const distAcross = Math.max(20, canvas.width - planeSize); const distDown = Math.max(20, canvas.height - planeSize); // total distance to move across and back const xRange = distAcross * 2; const yRange = distDown * 2; const speed = 180; planes.forEach((plane, ndx) => { // compute a unique time for each plane const t = time * speed + ndx * 300; // get a value between 0 and range const xt = t % xRange; const yt = t % yRange; // set our position going forward if 0 to half of range // and backward if half of range to range const x = xt < distAcross ? xt : xRange - xt; const y = yt < distDown ? yt : yRange - yt; plane.position.set(x, y, 0); }); renderer.render(scene, camera);
And you can see the images bounce pixel perfect off the edges of the canvas using pixel math just like a 2D canvas
Another common use for an OrthographicCamera
is to draw the
up, down, left, right, front, back views of a 3D modeling
program or a game engine's editor.
In the screenshot above you can see 1 view is a perspective view and 3 views are orthographic views.
That's the fundamentals of cameras. We'll cover a few common ways to move cameras in other articles. For now let's move on to shadows.


Date with mask
Inputed date: {{ data.date1.toString() }}
Document id in format '99aa999999'
Inputed id: {{ data.doc_id }}
Only digests but not more than nine
Inputed id: {{ data.digests }}
Strongly nine digests
Inputed id: {{ data.strong_digests }}
One to nine digests and letters
Inputed id: {{ data.symbols }}


I am a creative, artistic and ambitious graphic designer with a talent for thingking outside the box and coming with innovative ideas and designs. I am eager to be challenged in order to grow and further improve my designing skills. My greatest passion in life is using my creativity to benefit other people and organisations.
What I OfferCan order by phone
Redesign any design
Simple, modern and innovative
Fast designing


Hello Class!
Back to Home
Section 1
Here is some
text in
a paragraph.
Section 2
Here is some other text in a paragraph.
Option 1
Option 2
Option 3
Option 4


--- layout: archive title: Zulip Chat Archive permalink: /stream/144837-PR-reviews/topic/.23494.20limits-2.html ---
Is there anything blocking this PR?
Aah, I see there is still an open comment by Mario on the Github discussion.
@Reid Barton Do you plan fixing that? Or shall I try it?
I've fixed it.
Thanks, Scott!
@Mario Carneiro When you last looked at this PR, what was your impression? Anything serious besides your comment on the Github page?
Hmm, Travis reports the following error
/home/travis/build/leanprover/mathlib/category_theory/equivalence.lean:247:4: error: tactic failed, there are no goals to be solved state: no goals external command exited with status 1 The command "leanpkg test" exited with 1.
@Reid Barton Shall I fix this? Or would you rather limit (pun fully intended) the number of people meddling with these PR branches?
equivalence.lean
should not even exist on the limits-2
branch though?
Or were equivalences merged and I forgot?
I think there was a separate PR on them
Ah, maybe I didn't notice and then this got rebased?
I added some simp lemmas about isomorphisms, so the error isn't too surprising
These are my favourite kind of errors, where Lean proved something before a tactic block was finished...
I'm actually surprised simp
can't handle equivalence.trans
on its own now
Does travis automatically rebase before building?
You should ask our local Travis expert. (I have no clue who this is.)
I guess it must, since as far as I can tell the PR itself hasn't been rebased
I will try to fix this
I should take this opportunity to remind people that doing things after simp
is a bad idea if you want your proof to be stable.
Sometimes it can be a least of evils, but starting your proofs with dsimp, simp, ...
is not a good default.
In this case luckily there was no compilcated breakage, only the one case where a goal was closed and so the rest of the proof could be deleted. But stuff like https://github.com/leanprover/mathlib/blob/master/category_theory/equivalence.lean#L215 is scary, a new simp lemma can affect the rest of that proof in ways that are hard to predict.
In case of emergency, one can always use the workflow: type simp
, see new goal G, replace simp
by suffices : G, by simp[this],
which should work most of the times
I have proofs where I do things after tidy
. I guess that is a capital sin?
The original limits PR had a lot of these proofs, which I replaced with mostly one-liners
But I guess almost all those proofs ought to be killed by tidy
+ rewrite_search
, right?
Probably, but we don't have rewrite_search yet (and I would guess it's super slow?)
Remember we still hope to be able to have tidy
+ rewrite_search
output a proof script that Lean can check quickly. It won't be pretty in the source code, but won't be long to type
Right, which is sort of what we have right now. The problem is that script uses simp
But that proof script might not be stable.
Which is why we need (multi-layer) caching.
Then we need to use simp_squeeze
inside tidy
So I think this is fixable if we can avoid simp
, or figure out what it did and do it manually (maybe using Patrick's method)
simp only
is much more stable than simp
Yes, I haven't looked at simp_squeeze
yet, but it sounds like a good solution
(By the way, it is squeeze_simp
from tactic.squeeze
.)
indeed
I don't remember if it also provides a squeeze_dsimp
@Kevin Buzzard This is the current PR.
@Kevin Buzzard do they do all colimits? Filtered colimits? Products? Binary products? Eventually I think we'll want individual implementations of all of these, for an important category like CommRing.
All colimits
I'm ready to merge this, but there are some trivial merge conflicts in this branch
Just to flesh out what was going on here -- I knew that arbitrary colimits would follow from something like coproducts and pushouts, but it seemed to me that all three of these constructions (colimits, coproducts, pushouts) were "the same" -- they were all "build a multivariate polynomial ring with coefficients the disjoint union of the rings you're starting with, and then quotient out by some ideal". For the pushouts and coproducts the generators of the ideal were just a subset of the generators for the general case, so we just did the general case.
@Mario Carneiro, I think Reid may have already fixed this (it looks like he rearranged the history some last night), but I've just doublechecked that it's rebased onto master, and I've squashed and re-messaged a few commits. (We might consider merging this one without squashing any further, as Reid did a nice job of arranging the PR into a sensible linear sequence of commits.)
Hooray!
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


MUHAMMAD AMEEN AND FAYAZ AHMED NOONARI
Department of Electrical Engineering
Sukkur IBA University
We got motivation to make gimbal because it is used in most of application. Specially it used to stablize the camera and we know that in today's word how much the importance of camera?. Almost camera is used every where in every application for instance it is used in drones,vehcles etc. It is very useful for those who make videos of snowboarding, skiing, playing basketball and other sports, People who love to take videos of their cats and follow them around the house to capture crazy and funny moments. and it is also very useful for professional videographers.
HIGH LEVEL DESIGN:
Working principle of a gimbal is very simple.It uses MPU6050 Gyroscope sensor which detects the motion of body and genrates a signal and it goes to microcontroler.That microconroler controls the motors accordingly.- Major components used in project and their brief description.
- Atmega328 IC
- 2 Servo Motors
- MPU6050 Gyro Sensor
- "http://fab.cba.mit.edu/classes/863.16/section.Harvard/people/Liu/Gimbal/Gimbal.html"
- https://github.com/rkubera/ServoGimbal
- https://howtomechatronics.com/projects/diy-arduino-gimbal-self-stabilizing-platform/
- https://www.youtube.com/watch?v=acnLgZ4MiiI
- https://www.robotshop.com/community/blog/show/how-to-use-multiwii-as-a-servo-based-gimbal-stabilizer
The Atmega328 is a very popular microcontroller chip produced by Atmel. It is an 8-bit microcontroller that has 32K of flash memory, 1K of EEPROM, and 2K of internal SRAM. The Atmega328 has 28 pins.It has 14 digital I/O pins, of which 6 can be used as PWM outputs and 6 analog input pins. These I/O pins account for 20 of the pins.
Pin Configuration
A servo motor is a rotary actuator or motor that allows for a precise control in terms of angular position, acceleration and velocity, capabilities that a regular motor does not have.The function of the servo motor is to receive a control signal that represents a desired output position of the servo shaft and apply power to its DC motor until its shaft turns to that position. A servo motor is controlled by controlling its position using Pulse Width Modulation Technique. The width of the pulse applied to the motor is varied and send for a fixed amount of time.The pulse width determines the angular position of the servo motor. For example a pulse width of 1 ms causes a angular position of 0 degrees, whereas a pulse width of 2 ms causes a angular width of 180 degrees.
Pin configuration
It combines 3-axis Gyroscope, 3-axis Accelerometer and Digital Motion Processor all in small package. Also, it has additional feature of on-chip Temperature sensor. It has I2C bus interface to communicate with the microcontrollers.
Pin configuration
Communication Protocol:
This module uses I2C protocol in order to communicate with arduino nano, the MPU6050 sensor will collect the data and that data will be communicated with arduino nano to perform specific task.
Bill of material used in project
Deligation of Tasks
Almost We worked togeather in project making.We have visited the following webpages for our refrence,guidence as well as for understanding.
We are thankful to following webpages holders,really speaking these webpages were very helpful.DESIGN
Electrical Circuit Design
In the following electrical schemetic we have used Atmega328 for controlling the motors and execute the signal given by gyro sensor then it will genrate a signal that will operate motors accordingly.We have used Gyro Sensor(mpu6050) that will sence the motin for that we have used 8 pin female connector.We have used crystal oscilator.Which is used in the microprocessors and microcontrollers for providing the clock signals.We have used two 3 pin male connectors for servo motors and 2 pin male connector for source (battery).Electrical Schemetic of Eagle:
PCB Layout
After schemetic we moved to PCB Board design.In the board design we faced difficulty in to make comapct size of board. We routed and derouted again and again in order to make it very compact so that the handle should be in small size and it can be hold in hand very easily.Printed Circuit Board Layout
For printing the board We have to make image in .png extension for traces,outline and drills.
Printed Circuit Board Traces
Printed Circuit Board outline
Printed Circuit Board Drills
After milling the board we started to solder the printed board.
Now our board is completely ready.After this we moved to Boat Loader.That was very joyful moment for us when board successfully boot loaded.
Challanges that we faced:
After completion of our PCB soldering we have checked our project either it is working properly or not, we faced a big challange that our project was not working properly, when we uploaded the program to Atmega328 IC, at start MPU6050 sensor detected the motion to a very small interval of time and the Servo motors were trying to balance the system, after that MPU6050 failed to detect the motion and no data appears on Serial Monitor. Then we reset the System and again we met with the same problem like previous one which we have discussed.This was the time where we stuck to a point upto one week. To make our project functional,we decided to use Arduino nano and we keep on working towards our project completion.The schematic and PCB layouts of second PCB are as under.
Schemetic:
Board:
Traces Outline Drills
Software Development
Here is the flow chart of our program.Design of finished Product
Our project is hand-handeled product,For that we made handle in compact size so that it can be handled in hand easily. First we made the mechanical drying
After completing the mechanical drawing we moved to solid works design.
After making handle, we made square bracket type shape for roll motion and clamp for pitch motion.
Results
Here is the Link of vedio of our project.
Challenges Faced in Routing
This was our first time to have work on Eagle PCB designing software, At start we faced several problems in routing process
like, small distances between traces and components which actually creates a problems for PCB Milling Machine, then our instructor
guided us about these issues. So before printing our PCB we left little spaces between traces and components so that it becomes
easier for PCB Milling Machine. Also, during routing we faced hindrances to have work as professional student but with passage of time
we learnt alot, how to tackle and deal with issues in routing phase.
Challenging Faced In Bootloader
After designing our first PCB in which we used Atmega328 IC and other components which are mandatory in our project, we move towards bootloading pocess and we met with a problem burning the bootloader program. After that we start thinking about.. (How to debug the error?) and we took a multimeter in order to check connectivity between different components and traces on the PCB. troubleshooting the PCB we have successfully done with bootloader stage.
Conclusions
We have learent alot of new things in this subject. Before this we don't know about how to make Printed Circuit Board(PCB),
How to work on eagle sowfware. Now we are fully able to make PCB and work on Eagle software. Additionally we learnt about the machine
which is used for printing the boards. That is "Roland monoFab SRM-20 Milling machine". On the other hand we learnt how to deal
with SMD components in soldering, choosing the pakage of particular component. In short now we are able to work on any project of
Electronics .
Appendix
Here we have different files which are created in order to accomplish our task like, Solid work files, Eagle circuits/PCB Layout files, Arduino Code and rml files. One can easily access these files by just clicking on the pictures. This will help you in better understanding.
STL files.zip PCB files.zip Arduino code.zip RML files.zip


Introduction
JavaScript ("JS" for short) is a full-fledged dynamic programming language that can add interactivity to a website. It was invented by Brendan Eich (co-founder of the Mozilla project, the Mozilla Foundation, and the Mozilla Corporation).
JavaScript is versatile and beginner-friendly. With more experience, you'll be able to create games, animated 2D and 3D graphics, comprehensive database-driven apps, and much more!
Getting Started
What tools professionals use?
- A computer. Maybe that sounds obvious to some people, but some of you are reading this article on your phone or a library computer. For serious web development, it's better to invest in a desktop or laptop computer running Windows, macOS or Linux.
- A text editor, to write code in. This could be a text editor (e.g. Visual Studio Code, Notepad++, Sublime Text, Atom, GNU Emacs, or VIM), or a hybrid editor (e.g. Dreamweaver or WebStorm). Office document editors are not suitable for this use, as they rely on hidden elements that interfere with the rendering engines used by web browsers.
- Web browsers, to test code in. Currently, the most-used browsers are Firefox, Chrome, Opera, Safari, Internet Explorer and Microsoft Edge. You should also test how your site performs on mobile devices and on any old browsers your target audience may still be using (such as IE 8–10). Lynx, a text-based terminal web browser, is great for seeing how your site is experienced by visually-impaired users.
- A graphics editor, like GIMP, Figma, Paint.NET, Photoshop, Sketch or XD, to make images or graphics for your web pages.
- A version control system, to manage files on servers, collaborate on a project with a team, share code and assets and avoid editing conflicts. Right now, Git is the most popular version control system along with the GitHub or GitLab hosting service.
- An FTP program, used on older web hosting accounts to manage files on servers (Git is increasingly replacing FTP for this purpose). There are loads of (S)FTP programs available including Cyberduck, Fetch and FileZilla.
- An automation system, like Webpack, Grunt, or Gulp to automatically perform repetitive tasks, such as minifying code and running tests.
- Libraries, frameworks, etc., to speed up writing common functionality. A library tends to be an existing JavaScript or CSS file that provides ready-rolled functionality for you to make use of in your code. A framework tend to take this idea further, offering a complete system with some custom syntaxes for you to write a web app on top of.
Language basics
To give you a better understanding of how JavaScript works, let's explain some of the core features of the language. It's worth noting that these features are common to all programming languages. If you master these fundamentals, you have a head start on coding in other languages too!
Variables
Variables Variables are containers that store values. You start by declaring a variable with the var (less recommended, dive deeper for the explanation) or the let keyword, followed by the name you give to the variable:
let myVariable;
After declaring a variable, you can give it a value:
myVariable = 'Bob';
Also, you can do both these operations on the same line:
let myVariable = 'Bob';
You retrieve the value by calling the variable name:
myVariable;
After assigning a value to a variable, you can change it later in the code:
let myVariable = 'Bob';
myVariable = 'Steve';
Data types
String: This is a sequence of text known as a string. To signify that the value is a string, enclose it in single quote marks.
let myVariable = 'Bob';
Number:This is a number. Numbers don't have quotes around them.
let myVariable = 10;
Boolean:This is a True/False value. The words true and false are special keywords that don't need quote marks.
let myVariable = true;
Array:This is a structure that allows you to store multiple values in a single reference.
let myVariable = [1,'Bob','Steve',10]; Refer to each member of
the array like this: myVariable[0], myVariable[1], etc.
This can be anything. Everything in JavaScript is an object and can be stored in a variable. Keep this in mind as you learn.
let myVariable =
document.querySelector('h1')


All TP %pice% of Aden. Return to the point: %save_pice% adena
WARNING! To access the HellBound you need to complete the quest.
Do not try to teleport without the quest, nothing will lose money.
[ Hellbound Island ]


{% comment %} This window loads the list of inactive widgets in the template and does not need to update from the server, hence it's loaded in the template to simplify html generation and cut the unnecessary network traffic that a dynamically-loaded list of widgets would create. There are essentially two sections: widgets which belong to a product and widgets that don't. There's potentially a rendering bug in the code as a result of the many-to-many relationship between products and jobs. A job can belong to multiple products, but the logic for manipulating widgets with this window wasn't *designed* with this in consideration. I've run out of time to investigate and test this, but it's something to look out for. Try activating an inactive job which belongs to multiple products and check that the resulting behavior makes sense. {% endcomment %}


#GP(0) | If the destination operand is located in a non-writable segment. If a memory operand effective address is outside the CS, DS, ES, FS, or GS segment limit. If the DS, ES, FS, or GS register is used to access memory and it contains a null segment selector. |
#GP(0) | If the destination operand is located in a non-writable segment. If a memory operand effective address is outside the CS, DS, ES, FS, or GS segment limit. If the DS, ES, FS, or GS register is used to access memory and it contains a null segment selector. |
#SS(0) | If a memory operand effective address is outside the SS segment limit. |
#PF(fault-code) | If a page fault occurs. |
|


File Globals.lua
Functions
| Globals:getValue (name) | Get global variable value, without throwing error if global policy is strict and variable is undefined. |
| Globals:initVar (name, value, overwriteOk) | Declare a global variable with an initial (optional) value. |
| Globals:isDeclared (name) | Determine if variable is declared globally, even if value is nil (applies to strict policy only). |
| Globals:new (t) | Constructor for new global environment manager. |
| Globals:setStrict (strict, t) | Set strict or lax global policy. |
| Globals:setValue (name, value) | Glorified rawset. |
Functions
- Globals:getValue (name)
-
Get global variable value, without throwing error if global policy is strict and variable is undefined.
Parameters:
-
name
: (string, required) any variable name.
Usage:
keeps from throwing an error when global policy is strict.
Return value:
- value iff in global table and value is not nil, else nil.
-
- Globals:initVar (name, value, overwriteOk)
-
Declare a global variable with an initial (optional) value.
Parameters:
-
name
: (string, required) any variable name. -
value
: (any lua value, required) variable's value.
even if value is nil, this function still serves as a global variable definition
such that subsequent access will not throw an error, even if policy is strict. -
overwriteOk
:
Usage:
*** It is not recommended to use this function except during initialization. its considered "best practice" when using the framework to define all global variables in init.lua.
-
- Globals:isDeclared (name)
-
Determine if variable is declared globally, even if value is nil (applies to strict policy only).
Parameters:
-
name
:
-
- Globals:new (t)
-
Constructor for new global environment manager.
Parameters:
-
t
: initialization table, including:
strict (boolean, default true) - global access policy.
-
- Globals:setStrict (strict, t)
-
Set strict or lax global policy.
Parameters:
-
strict
: (boolean, default false) true => make strict (undeclared var access generates error), false => make lax (undeclared access allowed).
setting strict to true will clear out all previous explicit declarations. -
t
: (table, required) table to make strict access policy. In plugin's Init.lua, this is usually _G.
Usage:
although lax sounds better, strict is better (Lr2 is strict by default, Lr3 is lax by default).
*** Note: this is not an object method.
-
- Globals:setValue (name, value)
-
Glorified rawset.
Parameters:
-
name
: -
value
:
-