diff --git a/Assets/Scenes/Worlds/RiverWorld.unity b/Assets/Scenes/Worlds/RiverWorld.unity index 3cdd7568adfde102160c30e1c4c0c4d7843d86b9..cb9c4fe2a611ce77e76eef8b4d6c7338d098793a 100644 --- a/Assets/Scenes/Worlds/RiverWorld.unity +++ b/Assets/Scenes/Worlds/RiverWorld.unity @@ -14880,7 +14880,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 609957610} m_LocalRotation: {x: 0.84378076, y: -0.03475872, z: 0.53532517, w: 0.015902298} - m_LocalPosition: {x: -0.384, y: -0.861, z: 0.151} + m_LocalPosition: {x: -0.3654, y: -0.836, z: 0.2778} m_LocalScale: {x: 0.27480695, y: 0.42518657, z: 0.30265692} m_ConstrainProportionsScale: 0 m_Children: [] @@ -24607,52 +24607,52 @@ PrefabInstance: - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalPosition.x - value: 11.722 + value: 11.825 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalPosition.y - value: 8.0098 + value: 7.993 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalPosition.z - value: 39.862 + value: 39.95 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalRotation.w - value: -0.483636 + value: -0.46676508 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalRotation.x - value: 0.71233815 + value: 0.7260774 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalRotation.y - value: 0.38189718 + value: 0.39600503 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalRotation.z - value: -0.33589453 + value: -0.31324422 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalEulerAnglesHint.x - value: -25.624 + value: -25.45 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: 250.124 + value: 245.948 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalEulerAnglesHint.z - value: 105.47 + value: 106.114 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} @@ -33994,52 +33994,52 @@ PrefabInstance: - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalPosition.x - value: 10.970465 + value: 11.43 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalPosition.y - value: 8.24122 + value: 8.173 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalPosition.z - value: 39.65 + value: 39.45 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalRotation.w - value: -0.12834564 + value: -0.041761916 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalRotation.x - value: 0.52889407 + value: 0.5721977 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalRotation.y - value: 0.7336173 + value: 0.7355018 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalRotation.z - value: -0.40694487 + value: -0.36039272 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalEulerAnglesHint.x - value: 27.472 + value: 28.839 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: 224.22 + value: 212.749 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} propertyPath: m_LocalEulerAnglesHint.z - value: 82.921 + value: 84.404 objectReference: {fileID: 0} - target: {fileID: 1493958779012619316, guid: b9de24523a11d714db3851b5f0f9d527, type: 3} @@ -37054,8 +37054,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1772126844} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalRotation: {x: 0.01774803, y: 0.31728014, z: 0.07507478, w: 0.94518894} + m_LocalPosition: {x: -16.3, y: -2.2229772, z: 16.33} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -37064,7 +37064,7 @@ Transform: - {fileID: 1092756308} m_Father: {fileID: 117995034} m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: -0.807, y: 37.049, z: 8.812} --- !u!1001 &1772391926 PrefabInstance: m_ObjectHideFlags: 0 @@ -41443,22 +41443,22 @@ PrefabInstance: - target: {fileID: 2222111361405018444, guid: 88f2fd29f58b9734683512546acec310, type: 3} propertyPath: m_LocalPosition.x - value: -47.749832 + value: -49.503677 objectReference: {fileID: 0} - target: {fileID: 2222111361405018444, guid: 88f2fd29f58b9734683512546acec310, type: 3} propertyPath: m_LocalPosition.y - value: 1.2 + value: 1.1999998 objectReference: {fileID: 0} - target: {fileID: 2222111361405018444, guid: 88f2fd29f58b9734683512546acec310, type: 3} propertyPath: m_LocalPosition.z - value: -16.08 + value: -16.04778 objectReference: {fileID: 0} - target: {fileID: 2222111361405018444, guid: 88f2fd29f58b9734683512546acec310, type: 3} propertyPath: m_LocalRotation.w - value: 1 + value: 0.9811264 objectReference: {fileID: 0} - target: {fileID: 2222111361405018444, guid: 88f2fd29f58b9734683512546acec310, type: 3} @@ -41468,7 +41468,7 @@ PrefabInstance: - target: {fileID: 2222111361405018444, guid: 88f2fd29f58b9734683512546acec310, type: 3} propertyPath: m_LocalRotation.y - value: -0 + value: -0.19336754 objectReference: {fileID: 0} - target: {fileID: 2222111361405018444, guid: 88f2fd29f58b9734683512546acec310, type: 3} @@ -41483,7 +41483,7 @@ PrefabInstance: - target: {fileID: 2222111361405018444, guid: 88f2fd29f58b9734683512546acec310, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: 0 + value: -22.299 objectReference: {fileID: 0} - target: {fileID: 2222111361405018444, guid: 88f2fd29f58b9734683512546acec310, type: 3} diff --git a/Assets/Scripts/GenerateDemoFiles.cs b/Assets/Scripts/GenerateDemoFiles.cs index 12a98a971c724443c61b9e4210d578695324f067..f89fdca57429f5b3459108a37d8ee298bb84c27c 100644 --- a/Assets/Scripts/GenerateDemoFiles.cs +++ b/Assets/Scripts/GenerateDemoFiles.cs @@ -40,6 +40,39 @@ public static void GenerateAll() public static void GenerateSlingShotStage() { + // SlingShot + float angle = 45; + + float[,] slingshot = new float[,] { + { + -24.32552f, + 1.83532131f, + 1.56619191f + }, + { + -24.32552f, + 0.7562289f, + 1.56619227f + }, + { + -24.32552f, + 0.7562293f, + 3.46392965f + }, + }; + + // set � + Vector3 a = new Vector3(slingshot[0, 0], slingshot[0, 1], slingshot[0, 2]); + Vector3 b = new Vector3(slingshot[1, 0], slingshot[1, 1], slingshot[1, 2]); + Vector3 c = new Vector3(slingshot[2, 0], slingshot[2, 1], slingshot[2, 2]); + + c = (1 / Mathf.Tan(angle.ToRadians()) * (a - b).magnitude) + * (c-b).normalized + b; + + slingshot[2, 0] = c.x; + slingshot[2, 1] = c.y; + slingshot[2, 2] = c.z; + // Generate Stage StageStatic.LoadNewStage ( @@ -258,6 +291,20 @@ public static void GenerateSlingShotStage() out _, false, null, null); //StageStatic.stage.solution.ExposedSolutionFacts.Add(BounceURI); + // insert slingshot + for (int i = 0; i < slingshot.GetLength(0); i++) + { + verts.Add(new Vector3(slingshot[i, 0], slingshot[i, 1], slingshot[i, 2])); + + PIds.Add( + StageStatic.stage.solution.Add( + new PointFact(verts.Last(), Vector3.up), + out _, samestep, null, null, true + )); + StageStatic.stage.solution.ExposedSolutionFacts.Add(PIds.Last()); + samestep = true; + } + //// Set Solution //StageStatic.stage.solution.ValidationSet = // new List<SolutionRecorder.SubSolution> diff --git a/Assets/Scripts/MMTServer/CommunicationProtocoll/Endpoints.cs b/Assets/Scripts/MMTServer/CommunicationProtocoll/Endpoints.cs index c2c44c9ce3bbc5f271b18531027896531724cf06..c38425fc57304d3fdb934717cd3ffe5d7a930217 100644 --- a/Assets/Scripts/MMTServer/CommunicationProtocoll/Endpoints.cs +++ b/Assets/Scripts/MMTServer/CommunicationProtocoll/Endpoints.cs @@ -259,7 +259,7 @@ public override MMTFact MapURIs(Dictionary<string, string> old_to_new) proof.MapURIs(old_to_new) ); - public override SOMDoc GetDefines() => lhs; + public override SOMDoc GetDefines() => value; public override string[] GetDependentFactIds() => lhs.GetDependentFactIds().ShallowCloneAppend(value.GetDependentFactIds()); diff --git a/Assets/Stages/SlingShot.JSON b/Assets/Stages/SlingShot.JSON index 0d96c34774fe4364867a6b3c9afa5c394912f1cf..c506d295935e252e0786d59bb1aeb40dc53a62de 100644 --- a/Assets/Stages/SlingShot.JSON +++ b/Assets/Stages/SlingShot.JSON @@ -6,8 +6,12 @@ "use_install_folder": true, "solution": { "ValidationSet": [], - "ExposedSolutionFacts": [], - "ScrollOverwrites": { + "ExposedSolutionFacts": [ + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact181", + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact182", + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact183" + ], + "ScrollOverwrites": { "http://mathhub.info/FrameIT/frameworld?T3DBouncingScroll": [ { "Item1": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact179", @@ -86,7 +90,10 @@ "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact175", "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact176", "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact177", - "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact178" + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact178", + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact181", + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact182", + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact183" ], "WorkflowGadgetDict": { "-1": null @@ -366,6 +373,21 @@ "workflow_id": 1, "active": true, "isImmutable": false + }, + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact181": { + "workflow_id": 2, + "active": true, + "isImmutable": true + }, + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact182": { + "workflow_id": 2, + "active": true, + "isImmutable": true + }, + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact183": { + "workflow_id": 2, + "active": true, + "isImmutable": true } }, "Workflow": [ @@ -377,7 +399,7 @@ "gadget_rank": -1, "scroll_label": null, "GadgetFlow": [], - "GadgetTime": 0.0 + "GadgetTime": 1.0723972999994658 }, { "Id": "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact180", @@ -387,7 +409,7 @@ "gadget_rank": -1, "scroll_label": null, "GadgetFlow": [], - "GadgetTime": 0.0 + "GadgetTime": 1.0723972999994658 } ], "marker": 2, @@ -395,7 +417,7 @@ "backlog": 0, "soft_resetted": false, "invoke": true, - "MaxLabelId": 55, + "MaxLabelId": 57, "UnusedLabelIds": [], "JsonFactSpace": { "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact126": { @@ -2543,7 +2565,95 @@ "s_type": "RealLitFact", "_CustomLabel": null, "hasCustomLabel": false, + "LabelId": 0 + }, + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact181": { + "Point": { + "x": -24.32552, + "y": 1.83532131, + "z": 1.56619191, + "normalized": { + "x": -0.9951171, + "y": 0.075079985, + "z": 0.064070344, + "magnitude": 1.0, + "sqrMagnitude": 1.00000012 + }, + "magnitude": 24.4448814, + "sqrMagnitude": 597.552246 + }, + "Normal": { + "x": 0.0, + "y": 1.0, + "z": 0.0, + "magnitude": 1.0, + "sqrMagnitude": 1.0 + }, + "s_type": "PointFact", + "_CustomLabel": null, + "hasCustomLabel": false, "LabelId": 55 + }, + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact182": { + "Point": { + "x": -24.32552, + "y": 0.7562289, + "z": 1.56619227, + "normalized": { + "x": -0.9974538, + "y": 0.0310087278, + "z": 0.0642208, + "magnitude": 1.0, + "sqrMagnitude": 0.99999994 + }, + "magnitude": 24.3876152, + "sqrMagnitude": 594.755737 + }, + "Normal": { + "x": 0.0, + "y": 1.0, + "z": 0.0, + "magnitude": 1.0, + "sqrMagnitude": 1.0 + }, + "s_type": "PointFact", + "_CustomLabel": null, + "hasCustomLabel": false, + "LabelId": 56 + }, + "http://mathhub.info/FrameIT/frameworld?DefaultSituationSpace/SituationTheory1?fact183": { + "Point": { + "x": -24.32552, + "y": 0.7562291, + "z": 2.64528465, + "normalized": { + "x": -0.9936647, + "y": 0.03089094, + "z": 0.108056314, + "normalized": { + "x": -0.993664742, + "y": 0.0308909416, + "z": 0.108056322, + "magnitude": 1.0, + "sqrMagnitude": 1.0 + }, + "magnitude": 0.99999994, + "sqrMagnitude": 0.99999994 + }, + "magnitude": 24.4806118, + "sqrMagnitude": 599.3003 + }, + "Normal": { + "x": 0.0, + "y": 1.0, + "z": 0.0, + "magnitude": 1.0, + "sqrMagnitude": 1.0 + }, + "s_type": "PointFact", + "_CustomLabel": null, + "hasCustomLabel": false, + "LabelId": 57 } }, "name": null,