├── .gitignore ├── Assets ├── GreenGlow.mat ├── GreenGlow.mat.meta ├── New Terrain.asset ├── New Terrain.asset.meta ├── RedGlow.mat ├── RedGlow.mat.meta ├── Resources.meta ├── Resources │ ├── LinePrefab.prefab │ ├── LinePrefab.prefab.meta │ ├── PathPrefab.prefab │ └── PathPrefab.prefab.meta ├── RotateScript.cs ├── RotateScript.cs.meta ├── TerrainHeightFollower.cs ├── TerrainHeightFollower.cs.meta ├── TerrainScript.cs ├── TerrainScript.cs.meta ├── mountains3.jpg ├── mountains3.jpg.meta ├── scene01.unity └── scene01.unity.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset └── TimeManager.asset ├── README.md ├── docs └── clark_cs689_trrt.pdf └── images ├── image00.png ├── image01.png ├── image02.png ├── image03.png ├── image04.jpg ├── image05.png ├── image06.png ├── image07.png ├── image08.png ├── image09.png ├── image10.png └── image11.png /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | 6 | # Autogenerated VS/MD solution and project files 7 | *.csproj 8 | *.unityproj 9 | *.sln 10 | *.suo 11 | *.tmp 12 | *.user 13 | *.userprefs 14 | *.pidb 15 | *.booproj 16 | ExportedObj/ 17 | obj/ 18 | *.svd 19 | 20 | # Unity3D generated meta files 21 | *.pidb.meta 22 | 23 | # Unity3D Generated File On Crash Reports 24 | sysinfo.txt 25 | 26 | .DS_Store 27 | .DS_Store? 28 | ._* 29 | .Spotlight-V100 30 | .Trashes 31 | ehthumbs.db 32 | Thumbs.db -------------------------------------------------------------------------------- /Assets/GreenGlow.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/Assets/GreenGlow.mat -------------------------------------------------------------------------------- /Assets/GreenGlow.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84c4d5b6a324dbc4d93232c7355bb8b8 3 | timeCreated: 1441649753 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/New Terrain.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/Assets/New Terrain.asset -------------------------------------------------------------------------------- /Assets/New Terrain.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffed4d1f7dec8af44add897bfe49b370 3 | timeCreated: 1441585262 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/RedGlow.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/Assets/RedGlow.mat -------------------------------------------------------------------------------- /Assets/RedGlow.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed826d1c4fa4a7948a32fbe3f80e6261 3 | timeCreated: 1441649825 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41e3c0f331f55c6409a9b6957fba6943 3 | folderAsset: yes 4 | timeCreated: 1441760090 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Resources/LinePrefab.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/Assets/Resources/LinePrefab.prefab -------------------------------------------------------------------------------- /Assets/Resources/LinePrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f6b32ab97c896ad468cf17a65eac42ab 3 | timeCreated: 1441759525 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/PathPrefab.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/Assets/Resources/PathPrefab.prefab -------------------------------------------------------------------------------- /Assets/Resources/PathPrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd57f6e174400eb49a3d2f605a31d575 3 | timeCreated: 1441759609 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/RotateScript.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class RotateScript : MonoBehaviour { 5 | 6 | public float rotationSpeed = 50; 7 | 8 | // Use this for initialization 9 | void Start () { 10 | 11 | } 12 | 13 | // Update is called once per frame 14 | void Update () { 15 | if(Input.GetKey("left")) { 16 | transform.RotateAround(Vector3.zero, Vector3.up, rotationSpeed * Time.deltaTime); 17 | } 18 | 19 | if(Input.GetKey("right")) { 20 | transform.RotateAround(Vector3.zero, Vector3.up, -rotationSpeed * Time.deltaTime); 21 | } 22 | 23 | if(Input.GetKey("up") && transform.localRotation.eulerAngles.z < 90.0) { 24 | Vector3 rightAxis = transform.TransformDirection(Vector3.right); 25 | transform.RotateAround(Vector3.zero, rightAxis, rotationSpeed * Time.deltaTime); 26 | } 27 | 28 | if(Input.GetKey("down") && transform.position.y > 0.0) { 29 | Vector3 rightAxis = transform.TransformDirection(Vector3.right); 30 | transform.RotateAround(Vector3.zero, rightAxis, -rotationSpeed * Time.deltaTime); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/RotateScript.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 827bf9355a480d54ca30b7ab01bdc054 3 | timeCreated: 1441584379 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/TerrainHeightFollower.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class TerrainHeightFollower : MonoBehaviour { 5 | public float heightOffset = 0.1f; 6 | 7 | // Use this for initialization 8 | void Start () { 9 | 10 | } 11 | 12 | // Update is called once per frame 13 | void Update () { 14 | 15 | } 16 | 17 | void LateUpdate () { 18 | Vector3 pos = transform.position; 19 | 20 | pos.y = Terrain.activeTerrain.SampleHeight(pos)+heightOffset; 21 | 22 | transform.position = pos; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Assets/TerrainHeightFollower.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f56035bb928c3844a1a231064eaa684 3 | timeCreated: 1441584405 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/TerrainScript.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | using UnityEngine.UI; 4 | 5 | // author: Steven Clark 6 | // steven.p.clark@gmail.com 7 | // 2012/05/17 8 | 9 | public class TerrainScript : MonoBehaviour { 10 | class Node { 11 | public Vector3 pos; 12 | public Vector3 parentPos; 13 | public int parentInd; 14 | public GameObject line = null; 15 | public float heightOffset = 0.1f; //lift up a little to prevent clipping 16 | 17 | public Node(Vector3 _pos, Vector3 _parentPos, int _parentInd, GameObject obj) { 18 | pos = _pos; 19 | parentPos = _parentPos; 20 | parentInd = _parentInd; 21 | 22 | //obj = (GameObject) Instantiate(Resources.Load("Waypoint"), pos, Quaternion.identity); 23 | 24 | if(parentInd >= 0) { 25 | line = (GameObject) Instantiate(linePrefab); 26 | LineRenderer lr = line.GetComponent(); 27 | lr.SetPosition(0,pos + new Vector3(0f,heightOffset,0f)); 28 | lr.SetPosition(1,parentPos + new Vector3(0f,heightOffset,0f)); 29 | } 30 | } 31 | 32 | public void ConvertToPath() { 33 | GameObject.Destroy(line); 34 | line = (GameObject) Instantiate(pathPrefab); 35 | LineRenderer lr = line.GetComponent(); 36 | lr.SetPosition(0,pos + new Vector3(0f,heightOffset,0f)); 37 | lr.SetPosition(1,parentPos + new Vector3(0f,heightOffset,0f)); 38 | } 39 | }; 40 | 41 | 42 | private float stepSize; 43 | private Text coordText; 44 | private Text statusText; 45 | private Vector3 terrainSize; //remember, Y is height 46 | private float minX, maxX, minZ, maxZ, minHeight, maxHeight; 47 | private List nodes = new List(); 48 | private GameObject start; 49 | private GameObject goal; 50 | private bool solving = false; 51 | private int solvingSpeed = 1; //number of attempts to make per frame 52 | 53 | private float tx = 0f, tz = 0f; //target location to expand towards 54 | private bool needNewTarget = true; //keep track of whether our random sample is expired or still valid 55 | private int closestInd = 0; 56 | private int goalInd = 0; //when success is achieved, remember which node is close to goal 57 | private float extendAngle = 0f; 58 | 59 | private float temperature = 1e-6f; 60 | private const float temperatureAdjustFactor = 2.0f; 61 | private const float MIN_TEMPERATURE = 1e-15f; 62 | private int numTransitionFails = 0; 63 | private const int MAX_TRANSITION_FAILS = 20; 64 | 65 | private float pGoToGoal = 0.1f; 66 | private const int MAX_NUM_NODES = 10000; 67 | 68 | private float pathCost; 69 | 70 | public static Object linePrefab; 71 | public static Object pathPrefab; 72 | 73 | // Use this for initialization 74 | void Start () { 75 | coordText = GameObject.Find("Coordinate Text").GetComponent(); 76 | statusText = GameObject.Find("Status Text").GetComponent(); 77 | start = GameObject.Find("Start"); 78 | goal = GameObject.Find("Goal"); 79 | 80 | linePrefab = Resources.Load("LinePrefab"); 81 | pathPrefab = Resources.Load("PathPrefab"); 82 | 83 | terrainSize = Terrain.activeTerrain.terrainData.size; 84 | minX = -terrainSize.x/2; 85 | maxX = terrainSize.x/2; 86 | minZ = -terrainSize.z/2; 87 | maxZ = terrainSize.z/2; 88 | minHeight = 0; 89 | maxHeight = terrainSize.y; 90 | stepSize = Mathf.Min(terrainSize.x, terrainSize.z) / 100; //TODO experiment 91 | 92 | //Debug.Log(minX + " " + maxX + " " + minZ + " " + maxZ + " " + minHeight + " " + maxHeight + " " + stepSize); 93 | } 94 | 95 | // Update is called once per frame 96 | void Update () { 97 | if(Input.GetKeyDown("s")) { 98 | BeginSolving(10); 99 | } 100 | 101 | if(Input.GetKeyDown("p")) { 102 | PauseSolving(); 103 | } 104 | 105 | if(Input.GetKeyDown("c")) { 106 | ClearTree(); 107 | } 108 | 109 | if(solving) { 110 | if(nodes.Count < MAX_NUM_NODES) { 111 | statusText.text = "Solving... (nodes="+nodes.Count+", temp=" + temperature.ToString("0.00E00") + ")"; 112 | TRRTGrow(); 113 | } 114 | } 115 | } 116 | 117 | void OnMouseOver () { 118 | Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); 119 | RaycastHit hitInfo; 120 | 121 | if(GetComponent().Raycast(ray, out hitInfo, 5000)) { //TODO replace with camera far plane distance 122 | //Debug.Log(hitInfo.point); 123 | coordText.text = hitInfo.point.ToString(); 124 | 125 | if(Input.GetKey("1")) { 126 | start.transform.position = hitInfo.point; 127 | } 128 | 129 | if(Input.GetKey("2")) { 130 | goal.transform.position = hitInfo.point; 131 | } 132 | } 133 | } 134 | 135 | void OnMouseExit () { 136 | coordText.text = ""; 137 | } 138 | 139 | 140 | void BeginSolving(int speed) { 141 | solvingSpeed = speed; 142 | if(!solving) { 143 | solving = true; 144 | if(nodes.Count < 1) { 145 | //add initial node 146 | Node n = new Node(start.transform.position, start.transform.position, -1, gameObject); 147 | nodes.Add(n); 148 | 149 | //Debug.Log("Added node " + nodes.Count + ": " + n.pos.x + ", " + n.pos.y + ", " + n.pos.z); 150 | } 151 | } 152 | } 153 | 154 | void PauseSolving() { 155 | solving = false; 156 | statusText.text = "Solving paused."; 157 | } 158 | 159 | void ClearTree() { 160 | solving = false; 161 | statusText.text = "Tree cleared."; 162 | //FIXME 163 | for(int i=0; i MAX_TRANSITION_FAILS) { 329 | //Heat the temperature up 330 | temperature = temperature * temperatureAdjustFactor; 331 | numTransitionFails = 0; //restart counter 332 | } else { 333 | numTransitionFails++; 334 | } 335 | } else { 336 | //Cool the temperature down 337 | if(temperature > MIN_TEMPERATURE) { //prevent slim chance of temp becoming 0 338 | temperature = temperature / temperatureAdjustFactor; 339 | } 340 | numTransitionFails = 0; 341 | } 342 | 343 | return pass; 344 | } 345 | } 346 | -------------------------------------------------------------------------------- /Assets/TerrainScript.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 435e86400585342438c4e19caf9a2661 3 | timeCreated: 1441584411 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/mountains3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/Assets/mountains3.jpg -------------------------------------------------------------------------------- /Assets/mountains3.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 135c275e08459e146980900151d82e73 3 | timeCreated: 1441586008 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /Assets/scene01.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/Assets/scene01.unity -------------------------------------------------------------------------------- /Assets/scene01.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa5850b29f0b80d4aa26eb9c9b04db95 3 | timeCreated: 1441585033 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 RumBull 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.1.2f1 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # trrt-unity 2 | Unity3D-based implementation of the TRRT path-planning algorithm 3 | 4 | ![Unity Screenshot](/images/image10.png) 5 | 6 | ## Objectives 7 | - Implement the random-trees path-planning algorithm described in the whitepaper ["Transition-based RRT for Path Planning in Continuous Cost Spaces"](http://www.leonardjaillet.com/Publications_files/Iros08_Jaillet_TransitRRT.pdf) (Jaillet, Cortés, and Siméon, 2008) 8 | - Learn how to use the [Unity3D](https://unity3d.com/) engine 9 | 10 | ### Overview 11 | This class project, created for CS689 with [Dr. Amarda Shehu](http://cs.gmu.edu/~ashehu/), is based upon the whitepaper "Transition-based RRT for Path Planning in Continuous Cost Spaces" (Jaillet, Cortés, and Siméon, 2008). Their paper described a novel modification to traditional rapidly-exploring random trees (RRTs) that "combines the exploration strength of the RRT algorithm [...] with the efficiency of stochastic optimization methods". The algorithm described therein is suitable for a broad class of problems, including high-dimensional tasks such as motion planning for a many-DOF manipulator, as well analyzing protein-ligand interactions. My task was to translate the authors’ pseudo-code into a fully-functional algorithm while also implementing a user interface and 3D visualization. I selected [Unity3D](https://unity3d.com/) (a popular game-development tool) as my engine of choice for the latter elements. 12 | 13 | ### Links 14 | - [Video of the demo in action](https://www.dropbox.com/s/th1tqcyerogxq84/trrt_movie.mp4?dl=0) 15 | - [Presentation slides](/docs/clark_cs689_trrt.pdf) 16 | 17 | ### Prerequisites 18 | [Unity3D >= 5.0](https://unity3d.com/) (Originally developed under Unity 3.5 in 2012, updated for Unity 5.0 in Aug 2015) 19 | 20 | ### Implementation Details 21 | Implemented in C# (one of the 2/3 scripting languages available in Unity3D). The actual pathfinding code is in TerrainScript.cs. 22 | -------------------------------------------------------------------------------- /docs/clark_cs689_trrt.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/docs/clark_cs689_trrt.pdf -------------------------------------------------------------------------------- /images/image00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/images/image00.png -------------------------------------------------------------------------------- /images/image01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/images/image01.png -------------------------------------------------------------------------------- /images/image02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/images/image02.png -------------------------------------------------------------------------------- /images/image03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/images/image03.png -------------------------------------------------------------------------------- /images/image04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/images/image04.jpg -------------------------------------------------------------------------------- /images/image05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/images/image05.png -------------------------------------------------------------------------------- /images/image06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/images/image06.png -------------------------------------------------------------------------------- /images/image07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/images/image07.png -------------------------------------------------------------------------------- /images/image08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/images/image08.png -------------------------------------------------------------------------------- /images/image09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/images/image09.png -------------------------------------------------------------------------------- /images/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/images/image10.png -------------------------------------------------------------------------------- /images/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevenpclark/trrt-unity/50b097c8c621a6b4f27bc47ec0801f590bc46e8a/images/image11.png --------------------------------------------------------------------------------