3D Carousel in Android

You are using a function called Calculate3DPosition which calculates X, Y, Z positions from the angle and then those are used in a matrix.translate call. What you need is actually much simpler – you just need to call matrix.rotate with the angle. It might look surprisingly easy when you’ve finished, but honestly, the only complexity … Read more

3d transforms on SVG element

Update Nov 2018: Testing the snipet from the question in latest chrome and Firefox works. Although support for 3d transforms on svg elements isn’t very wide, browsers are implementing it more and more. Origin answer : 3D transforms aren’t supported on SVG elements. There are a few workarounds though : If the svg doesn’t contain … Read more

How to make a 3D scatter plot in matplotlib

You can use matplotlib for this. matplotlib has a mplot3d module that will do exactly what you want. import matplotlib.pyplot as plt import random fig = plt.figure(figsize=(12, 12)) ax = fig.add_subplot(projection=’3d’) sequence_containing_x_vals = list(range(0, 100)) sequence_containing_y_vals = list(range(0, 100)) sequence_containing_z_vals = list(range(0, 100)) random.shuffle(sequence_containing_x_vals) random.shuffle(sequence_containing_y_vals) random.shuffle(sequence_containing_z_vals) ax.scatter(sequence_containing_x_vals, sequence_containing_y_vals, sequence_containing_z_vals) plt.show() The code above generates a … Read more

Using javascript for custom purposes

This shows the two-way interaction between Javascript and c#. Javascript calls a c# method C# gets the result of an expression in Javascript – Type scriptType = Type.GetTypeFromCLSID(Guid.Parse(“0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC”)); dynamic obj = Activator.CreateInstance(scriptType, false); obj.Language = “javascript”; obj.AddObject(“MyClass”,new JSAccessibleClass()); obj.Eval(“MyClass.MsgBox(‘Hello World’)”); //<–1 var result = obj.Eval(“3+5”); //<–2 [ComVisible(true)] public class JSAccessibleClass { public void MsgBox(string s) … Read more

Transformation of 3D objects related to vanishing points and horizon line

This is nowhere near my cup of tea so handle with extreme prejudice and also far form solution just some start point hints… First of all we need to define some constraints/assumptions in order to make this to work. user selects 4 lines representing 2 perpendicular planes and these 2 QUADs have the same height … Read more