-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
997 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: "Pitaの特徴" | ||
title: "1. Pitaの特徴" | ||
--- | ||
|
||
## Pitaの特徴 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: "クイックスタート" | ||
weight: 10 | ||
chapter: true | ||
pre: "<b>1. </b>" | ||
--- | ||
|
||
### チャプター 1 | ||
|
||
# クイックスタート | ||
|
||
Pitaのダウンロードとインストール、サンプルの実行手順を紹介します。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: "ダウンロードとインストール" | ||
weight: 10 | ||
--- | ||
|
||
### ダウンロードとインストール | ||
#### Windows | ||
|
||
|
||
#### MacOS | ||
Pitaは一度図形を作ったら、それを継承することで似たような図形を簡単に作ることができます。 | ||
また、図形同士のブーリアン演算も行うことができます。 | ||
さらに図形定義から他の図形定義を参照することもでき、作図工程のモジュール化を支援します。 | ||
|
||
#### Ubuntu | ||
Pitaは図形に関する高度な演算機能(図形をパスに沿うよう変形させる、障害物を迂回する経路を探索する、...)を提供します。 | ||
また、分岐やループなどの制御構文、レコードやリストなどのデータ構造、第一級関数など汎用性の高い言語機能を備えているので、複雑な図形も簡潔に記述することが可能です。 | ||
|
||
### ソースコードのビルド |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import "rec_shape2.cgl" as rec2 | ||
import "koch_snowflake.cgl" as koch | ||
import "pita_p2.cgl" as p2 | ||
import "pita_constraint_example.cgl" as cs | ||
|
||
Center = (shape -> Square{polygon=BoundingBox(shape).result.polygon}.center()) | ||
Left = (shape -> Square{polygon=BoundingBox(shape).result.polygon}.left()) | ||
Right = (shape -> Square{polygon=BoundingBox(shape).result.polygon}.right()) | ||
|
||
main = Shape{ | ||
a: (s = rec2.tree, s{}) | ||
b: (s = koch.tree, s{scale: X2(0.4), pos: Vec2(500,0)}) | ||
c: (s = p2.main, s{scale: X2(0.5), pos: Vec2(800,0)}) | ||
d: (s = cs.main, s{scale: X2(2.0), pos: Vec2(1200,0)}) | ||
sat((Center(a).y - Center(b).y)^2 == 0) | ||
sat((Center(b).y - Center(c).y)^2 == 0) | ||
sat((Center(c).y - Center(d).y)^2 == 0) | ||
var(b.pos.y, c.pos.y, d.pos.y) | ||
} | ||
|
||
s = Free(main) | ||
main2 = s{ | ||
dd = (Right(s.a).x - Left(s.b).x) | ||
sat( (dd - (Right(b).x - Left(c).x))^2 == 0) | ||
sat( (dd - (Right(c).x - Left(d).x))^2 == 0) | ||
var(c.pos.x, d.pos.x) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.