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
public class SceneControler2 : MonoBehaviour { | |
DrawGraph dg; | |
AnimationSinVectorMesh animSin; | |
void Awake () { | |
GameObject go = Instantiate(Resources.Load("DrawGraph")) as GameObject; | |
dg = go.GetComponent<DrawGraph>(); |
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
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
public class GridObj : MonoBehaviour | |
{ | |
public Rect gridSize = new Rect(-0.5f, -0.5f, 1, 1); | |
public Color gridColor = new Color(0f, 0f, 0f); | |
public int gridDivid = 20; //グリッドの分割数。偶数に設定する事 |
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
//このシェーダーは法線に基づいてメッシュを着色します。頂点入力として、appdata_base を使用します | |
//出典:https://docs.unity3d.com/ja/current/Manual/SL-VertexProgramInputs.html | |
Shader "tutorial/VertexInputSimple" { | |
SubShader{ | |
Pass{ | |
CGPROGRAM | |
//頂点シェーダーとフラグメントシェーダーのプログラミング |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpherePos : MonoBehaviour | |
{ | |
public Transform targetTransform; | |
public float radius, theta, phi, speed; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Vector2SpherePos : MonoBehaviour | |
{ | |
void Start() | |
{ | |
//デカルト座標 | |
Vector3 pos = new Vector3(1f, 4f, 2f); |
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
using UnityEngine; | |
using System.Collections; | |
public class TargetDigit : MonoBehaviour | |
{ | |
void Start() | |
{ | |
print(Digit(123456789, 6)); //7桁目を表示(変数digは0を含んでカウントしている) | |
} | |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System.IO; | |
using System.Net; | |
using System.Xml; | |
//公式資料 | |
//https://partner.steamgames.com/doc/webapi |
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
amari:1$ | |
for a:0 thru 6 do | |
for b:0 thru 6 do | |
( | |
amari:divide(divide((6*k+a)*(6*k+b),6*k)[2],6)[2], | |
/* C#の「!=」はmaximaでは「#」 */ | |
if (amari#0) then | |
print("x=",(6*k+a), | |
",y=",(6*k+b), | |
",xy=",ratsimp((6*k+a)*(6*k+b)), |
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
//組合せ計算 | |
public int nCr(int n, int r) | |
{ | |
if (n == r || r == 0) return 1; | |
int deno = n; | |
int nume = 1; | |
for (int i = 2; i <= r; n--, i++) | |
{ | |
deno *= (n - 1); |
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
using UnityEngine; | |
using System.Collections; | |
public class DD : MonoBehaviour | |
{ | |
void Start() | |
{ | |
print(Digit(123456789, 6)); //7桁目を表示(変数digは0を含んでカウントしている) | |
} | |
OlderNewer