<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Xikh - Medium]]></title>
        <description><![CDATA[All xi pains will depart If YOU listen to our hearts. ‘KH - Medium]]></description>
        <link>https://medium.com/xikh?source=rss----bca38c6198f8---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Xikh - Medium</title>
            <link>https://medium.com/xikh?source=rss----bca38c6198f8---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 13 Nov 2026 00:14:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/xikh" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Reckoning Time]]></title>
            <link>https://medium.com/xikh/reckoning-21df48e8c20b?source=rss----bca38c6198f8---4</link>
            <guid isPermaLink="false">https://medium.com/p/21df48e8c20b</guid>
            <category><![CDATA[builder-foundation]]></category>
            <category><![CDATA[names]]></category>
            <category><![CDATA[indias-greatness]]></category>
            <category><![CDATA[reckoning]]></category>
            <category><![CDATA[fictional-autobiography]]></category>
            <dc:creator><![CDATA[Xikh]]></dc:creator>
            <pubDate>Thu, 27 Sep 2018 16:04:10 GMT</pubDate>
            <atom:updated>2018-09-27T16:18:47.745Z</atom:updated>
            <content:encoded><![CDATA[<p>Indian Pundits have introduced us with natures’ element, gave theories, but gave little or no information about themselves. In our land, there is much written about fictional God and Goddesses, scriptures were written, but autobiographies about such <a href="http://paypal.me/xikh"><strong>Savants</strong></a> have not been written.</p><blockquote>the society don’t even want to discuss their names</blockquote><p>This mentality continues even now. In Religious expenditures our society even today is not behind. We recite stories of Saints and Gods but <a href="http://paypal.me/xikh"><strong><em>Ones</em></strong></a> who rebuilt foundation of India’s Greatness, <strong>the society don’t even want to discuss their names.</strong></p><p><a href="http://paypal.me/xikh">paypal.me/xikh</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21df48e8c20b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xikh/reckoning-21df48e8c20b">Reckoning Time</a> was originally published in <a href="https://medium.com/xikh">Xikh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SpinWorld! in Android , 3D version]]></title>
            <link>https://medium.com/xikh/spinworld-in-android-3d-version-d14e6fa4d076?source=rss----bca38c6198f8---4</link>
            <guid isPermaLink="false">https://medium.com/p/d14e6fa4d076</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[3d]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[spinworld]]></category>
            <dc:creator><![CDATA[Xikh]]></dc:creator>
            <pubDate>Mon, 24 Sep 2018 20:05:48 GMT</pubDate>
            <atom:updated>2018-10-02T06:52:36.053Z</atom:updated>
            <content:encoded><![CDATA[<p>Take 1 :</p><p>Objective of the simple mission is to Spin a 3D World in Android.</p><p>Here is the code.</p><pre>``` dart<br>package app.softwares.helloworld;</pre><pre>import io.flutter.plugin.common.MethodCall;<br>import io.flutter.plugin.common.MethodChannel;<br>import io.flutter.plugin.common.MethodChannel.MethodCallHandler;<br>import io.flutter.plugin.common.MethodChannel.Result;<br>import io.flutter.plugin.common.PluginRegistry.Registrar;</pre><pre>/// Include these requirements in your AndroidManifest.xml file<br>/// &lt;!-- Tell the system this app requires OpenGL ES 2.0. --&gt;<br>/// &lt;uses-feature android:glEsVersion=&quot;0x00020000&quot; android:required=&quot;true&quot; /&gt;<br>import android.opengl.GLES20;</pre><pre>/// If your application uses texture compression formats, you must declare the formats your application supports in your manifest file using &lt;supports-gl-texture&gt;. <br>/// See Texture compression support</pre><pre>public class SpinworldPlugin implements MethodCallHandler {<br>  /** Plugin registration. */<br>  public static void registerWith(Registrar registrar) {<br>    final MethodChannel channel = new MethodChannel(registrar.messenger(), &quot;spinworld&quot;);<br>    channel.setMethodCallHandler(new SpinworldPlugin());<br>  }<br>    <br>  <a href="http://twitter.com/Override">@Override</a><br>  public void onMethodCall(MethodCall call, Result result) {<br>    if (call.method.equals(&quot;getPlatformVersion&quot;)) {<br>      result.success(&quot;Android &quot; + android.os.Build.VERSION.RELEASE);<br>    } else {<br>      result.notImplemented();<br>    }<br>  }<br>}</pre><pre>``` java<br>public class SpinWorldActivity extends Activity {</pre><pre>private GLSurfaceView mGLView;</pre><pre><a href="http://twitter.com/Override">@Override</a><br>    public void onCreate(Bundle savedInstanceState) {<br>        super.onCreate(savedInstanceState);</pre><pre>// Create a GLSurfaceView instance and set it<br>        // as the ContentView for this Activity.<br>        mGLView = new MyGLSurfaceView(this);<br>        setContentView(mGLView);<br>    }<br>}</pre><pre>class MyGLSurfaceView extends GLSurfaceView {</pre><pre>private final MyGLRenderer mRenderer;</pre><pre>public MyGLSurfaceView(Context context){<br>        super(context);</pre><pre>// Create an OpenGL ES 2.0 context<br>        setEGLContextClientVersion(2);</pre><pre>mRenderer = new MyGLRenderer();</pre><pre>/// ROTATE SHAPE - COMMENT OUT FLAGS<br>        // Render the view only when there is a change in the drawing data<br>  setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); // Old<br>        <br>        // Render the view only when there is a change in the drawing data.<br>        // To allow the triangle to rotate automatically, this line is commented out:<br>        //setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY); // New</pre><pre>// Set the Renderer for drawing on the GLSurfaceView<br>        setRenderer(mRenderer);<br>        <br>    }<br>}</pre><pre>public class MyGLRenderer implements GLSurfaceView.Renderer {<br>  /// DRAWING SHAPES<br>    private Triangle mTriangle;<br>    private Square   mSquare;<br>    <br>    /// DEFINING PROJECTION<br>    // mMVPMatrix is an abbreviation for &quot;Model View Projection Matrix&quot;<br>    private final float[] mMVPMatrix = new float[16];<br>    private final float[] mProjectionMatrix = new float[16];<br>    private final float[] mViewMatrix = new float[16];</pre><pre>public void onSurfaceCreated(GL10 unused, EGLConfig config) {<br>        // Set the background frame color<br>        GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);<br>        <br>        /// DRAWING SHAPES<br>        // initialize a triangle<br>        mTriangle = new Triangle();<br>        // initialize a square<br>        mSquare = new Square();</pre><pre>}</pre><pre>/// ROTATE SHAPE<br>    private float[] mRotationMatrix = new float[16];</pre><pre>public void onDrawFrame(GL10 unused) {<br>        // Redraw background color<br>        GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);<br>        <br>        /// DRAWING SHAPES<br>        mTriangle.draw();<br>        <br>        /// DEFINING CAMERA VIEW<br>        // Set the camera position (View matrix)<br>        Matrix.setLookAtM(mViewMatrix, 0, 0, 0, -3, 0f, 0f, 0f, 0f, 1.0f, 0.0f);<br>         <br>        /// ROTATE SHAPE<br>        float[] scratch = new float[16];</pre><pre>// Create a rotation transformation for the triangle<br>        long time = SystemClock.uptimeMillis() % 4000L;<br>        float angle = 0.090f * ((int) time);<br>        Matrix.setRotateM(mRotationMatrix, 0, angle, 0, 0, -1.0f);</pre><pre>// Combine the rotation matrix with the projection and camera view<br>        // Note that the mMVPMatrix factor *must be first* in order<br>        // for the matrix multiplication product to be correct.<br>        Matrix.multiplyMM(scratch, 0, mMVPMatrix, 0, mRotationMatrix, 0);<br>        <br>        /// ROTATE SHAPE - OLD CODE COMMENTED<br>        // Calculate the projection and view transformation<br>        // Matrix.multiplyMM(mMVPMatrix, 0, mProjectionMatrix, 0, mViewMatrix, 0);</pre><pre>// Draw shape<br>        mTriangle.draw(mMVPMatrix);<br>    }</pre><pre>public void onSurfaceChanged(GL10 unused, int width, int height) {<br>        GLES20.glViewport(0, 0, width, height);<br>        <br>        /// DEFINING PROJECTION<br>        float ratio = (float) width / height;</pre><pre>// this projection matrix is applied to object coordinates<br>        // in the onDrawFrame() method<br>        Matrix.frustumM(mProjectionMatrix, 0, -ratio, ratio, -1, 1, 3, 7);</pre><pre>}<br>    <br>    /// DRAWING SHAPES - SHADER UTILITY<br>    public static int loadShader(int type, String shaderCode){</pre><pre>// create a vertex shader type (GLES20.GL_VERTEX_SHADER)<br>        // or a fragment shader type (GLES20.GL_FRAGMENT_SHADER)<br>        int shader = GLES20.glCreateShader(type);</pre><pre>// add the source code to the shader and compile it<br>        GLES20.glShaderSource(shader, shaderCode);<br>        GLES20.glCompileShader(shader);</pre><pre>return shader;<br> }<br>}</pre><pre>/// DEFINING SHAPES<br>public class Triangle {</pre><pre>private FloatBuffer vertexBuffer;<br>    <br>    /// DRAWING SHAPES<br>    private final int mProgram;</pre><pre>// number of coordinates per vertex in this array<br>    static final int COORDS_PER_VERTEX = 3;<br>    static float triangleCoords[] = {   // in counterclockwise order:<br>             0.0f,  0.622008459f, 0.0f, // top<br>            -0.5f, -0.311004243f, 0.0f, // bottom left<br>             0.5f, -0.311004243f, 0.0f  // bottom right<br>    };</pre><pre>// Set color with red, green, blue and alpha (opacity) values<br>    float color[] = { 0.63671875f, 0.76953125f, 0.22265625f, 1.0f };</pre><pre>public Triangle() {<br>        // initialize vertex byte buffer for shape coordinates<br>        ByteBuffer bb = ByteBuffer.allocateDirect(<br>                // (number of coordinate values * 4 bytes per float)<br>                triangleCoords.length * 4);<br>        // use the device hardware&#39;s native byte order<br>        bb.order(ByteOrder.nativeOrder());</pre><pre>// create a floating point buffer from the ByteBuffer<br>        vertexBuffer = bb.asFloatBuffer();<br>        // add the coordinates to the FloatBuffer<br>        vertexBuffer.put(triangleCoords);<br>        // set the buffer to read the first coordinate<br>        vertexBuffer.position(0);<br>        <br>        /// DRAWING SHAPES<br>        int vertexShader = MyGLRenderer.loadShader(GLES20.GL_VERTEX_SHADER,<br>                                        vertexShaderCode);<br>        int fragmentShader = MyGLRenderer.loadShader(GLES20.GL_FRAGMENT_SHADER,<br>                                        fragmentShaderCode);<br>        <br>        // create empty OpenGL ES Program<br>        mProgram = GLES20.glCreateProgram();</pre><pre>// add the vertex shader to program<br>        GLES20.glAttachShader(mProgram, vertexShader);</pre><pre>// add the fragment shader to program<br>        GLES20.glAttachShader(mProgram, fragmentShader);</pre><pre>// creates OpenGL ES program executables<br>        GLES20.glLinkProgram(mProgram);</pre><pre>private int mPositionHandle;<br>        private int mColorHandle;</pre><pre>private final int vertexCount = triangleCoords.length / COORDS_PER_VERTEX;<br>        private final int vertexStride = COORDS_PER_VERTEX * 4; // 4 bytes per vertex</pre><pre>public void draw(float[] mvpMatrix) { // pass in the calculated transformation matrix</pre><pre>// Add program to OpenGL ES environment<br>            GLES20.glUseProgram(mProgram);</pre><pre>// get handle to vertex shader&#39;s vPosition member<br>            mPositionHandle = GLES20.glGetAttribLocation(mProgram, &quot;vPosition&quot;);</pre><pre>// Enable a handle to the triangle vertices<br>            GLES20.glEnableVertexAttribArray(mPositionHandle);</pre><pre>// Prepare the triangle coordinate data<br>            GLES20.glVertexAttribPointer(mPositionHandle, COORDS_PER_VERTEX,<br>                                         GLES20.GL_FLOAT, false,<br>                                         vertexStride, vertexBuffer);</pre><pre>// get handle to fragment shader&#39;s vColor member<br>            mColorHandle = GLES20.glGetUniformLocation(mProgram, &quot;vColor&quot;);</pre><pre>// Set color for drawing the triangle<br>            GLES20.glUniform4fv(mColorHandle, 1, color, 0);</pre><pre>// Draw the triangle<br>            GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, vertexCount);</pre><pre>// Disable vertex array<br>            GLES20.glDisableVertexAttribArray(mPositionHandle);<br>            <br>            /// APPLY PROJECTION AND CAMERA TRANSFORMS<br>            // get handle to shape&#39;s transformation matrix<br>            mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, &quot;uMVPMatrix&quot;);</pre><pre>// Pass the projection and view transformation to the shader<br>            GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mvpMatrix, 0);</pre><pre>// Draw the triangle<br>            GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, vertexCount);</pre><pre>// Disable vertex array<br>            GLES20.glDisableVertexAttribArray(mPositionHandle);</pre><pre>}</pre><pre>}<br>    <br>    /// DRAWING SHAPES - SHADERS<br>    /// APPLY PROJECTION AND CAMERA TRANSFORMS<br>    private final String vertexShaderCode =<br>        // This matrix member variable provides a hook to manipulate<br>        // the coordinates of the objects that use this vertex shader<br>        &quot;uniform mat4 uMVPMatrix;&quot; +<br>        &quot;attribute vec4 vPosition;&quot; +<br>        &quot;void main() {&quot; +<br>        // the matrix must be included as a modifier of gl_Position<br>        // Note that the uMVPMatrix factor *must be first* in order<br>        // for the matrix multiplication product to be correct.<br>        //&quot;  gl_Position = vPosition;&quot; + // Old<br>        &quot;  gl_Position = uMVPMatrix * vPosition;&quot; + // New<br>        &quot;}&quot;;<br>    <br>    // Use to access and set the view transformation<br>    private int mMVPMatrixHandle;</pre><pre>private final String fragmentShaderCode =<br>        &quot;precision mediump float;&quot; +<br>        &quot;uniform vec4 vColor;&quot; +<br>        &quot;void main() {&quot; +<br>        &quot;  gl_FragColor = vColor;&quot; +<br>        &quot;}&quot;;</pre><pre>}</pre><pre>public class Square {</pre><pre>private FloatBuffer vertexBuffer;<br>    private ShortBuffer drawListBuffer;</pre><pre>// number of coordinates per vertex in this array<br>    static final int COORDS_PER_VERTEX = 3;<br>    static float squareCoords[] = {<br>            -0.5f,  0.5f, 0.0f,   // top left<br>            -0.5f, -0.5f, 0.0f,   // bottom left<br>             0.5f, -0.5f, 0.0f,   // bottom right<br>             0.5f,  0.5f, 0.0f }; // top right</pre><pre>private short drawOrder[] = { 0, 1, 2, 0, 2, 3 }; // order to draw vertices</pre><pre>public Square() {<br>        // initialize vertex byte buffer for shape coordinates<br>        ByteBuffer bb = ByteBuffer.allocateDirect(<br>        // (# of coordinate values * 4 bytes per float)<br>                squareCoords.length * 4);<br>        bb.order(ByteOrder.nativeOrder());<br>        vertexBuffer = bb.asFloatBuffer();<br>        vertexBuffer.put(squareCoords);<br>        vertexBuffer.position(0);</pre><pre>// initialize byte buffer for the draw list<br>        ByteBuffer dlb = ByteBuffer.allocateDirect(<br>        // (# of coordinate values * 2 bytes per short)<br>                drawOrder.length * 2);<br>        dlb.order(ByteOrder.nativeOrder());<br>        drawListBuffer = dlb.asShortBuffer();<br>        drawListBuffer.put(drawOrder);<br>        drawListBuffer.position(0);<br>    }<br>}</pre><p>Thanks for your contribution <a href="http://paypal.me/xikh">paypal.me/xikh</a> in helping us live the world.</p><p>The triangles has to create a 3D world</p><p>Lifted from my friend <a href="https://codepen.io/Mamboleoo">https://codepen.io/Mamboleoo</a> Louis</p><pre>``` javascript</pre><pre>...</pre><pre>var positions = [];<br>for (var x = 0; x &lt; 5000; x++) {<br>  var pos = {<br>    x: Math.random(),<br>    y: Math.random(),<br>    z: Math.random(),<br>    lat : 2 * Math.PI * Math.random(),<br>    long : Math.acos(2 * Math.random() - 1)<br>  };<br>  pos.u = Math.cos(pos.long);<br>  pos.sqrt = Math.sqrt(1 - (pos.u*pos.u));<br>  positions.push(pos);<br>}</pre><pre>...</pre><pre>galaxy = new THREE.Object3D();<br>  scene.add(galaxy);<br>  <br>  controls = new THREE.TrackballControls(camera, renderer.domElement);</pre><pre>var loader = new THREE.TextureLoader();<br>  loader.crossOrigin = &quot;&quot;;<br>  var loader2 = new THREE.TextureLoader();<br>  loader2.crossOrigin = &quot;&quot;;<br>  dotTexture = loader2.load(&quot;<a href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/127738/dotTexture.png">https://s3-us-west-2.amazonaws.com/s.cdpn.io/127738/dotTexture.png</a>&quot;);<br>  <br>  dotsMaterial = new THREE.PointsMaterial({<br>      size: userData.dotsSize,<br>      map: dotTexture,<br>      transparent: true,<br>      opacity:userData.dotsOpacity,<br>      alphaTest: 0.1<br>  });<br>  <br>  strokesMaterial = new THREE.LineBasicMaterial({<br>    color: 0xffffff,<br>    transparent:true,<br>    opacity:userData.linesOpacity<br>  });<br>  strokes = new THREE.LineSegments(new THREE.Geometry(), strokesMaterial);<br>  galaxy.add(strokes);<br>  dotStrokes = new THREE.Points(new THREE.Geometry(), dotsMaterial);<br>  galaxy.add(dotStrokes);<br>  <br>  createStrokes();<br>  requestAnimationFrame(render);<br>}</pre><pre>var particlesRandom = [];</pre><pre>function createStrokes() {<br>  var dots = new THREE.Geometry();<br>  // Create vertices<br>  for (var i = 0; i &lt; userData.amount; i++) {<br>    var pos = {<br>      x: (positions[i].x*userData.height + userData.radius) * positions[i].sqrt * Math.cos(positions[i].lat),<br>      y: (positions[i].y*userData.height + userData.radius) * positions[i].sqrt * Math.sin(positions[i].lat),<br>      z: (positions[i].z*userData.height + userData.radius) * positions[i].u<br>    };<br>    var vector = new THREE.Vector3(pos.x, pos.y, pos.z);<br>    vector.amount = 0;<br>    dots.vertices.push(vector);<br>  }<br>  <br>  // Create segments<br>  var segments = new THREE.Geometry();<br>  for(var i=dots.vertices.length-1;i&gt;=0;i--){<br>    var vector = dots.vertices[i];<br>    for(var j=dots.vertices.length-1;j&gt;=0;j--){<br>      if(vector.amount &lt; userData.connections &amp;&amp; i!==j &amp;&amp; vector.distanceTo(dots.vertices[j]) &lt; userData.distance){<br>        segments.vertices.push(vector);<br>        segments.vertices.push(dots.vertices[j]);<br>        vector.amount++; <br>        dots.vertices[j].amount++;<br>      }<br>    }<br>  }<br>  <br>  strokesMaterial.opacity = userData.linesOpacity;<br>  strokesMaterial.color = new THREE.Color(userData.strokesColor);<br>  strokes.geometry = segments;<br>  <br>  if(userData.dots){<br>    dotsMaterial.size = userData.dotsSize;<br>    dotsMaterial.opacity = userData.dotsOpacity;<br>    dotsMaterial.color = new THREE.Color(userData.dotsColor);<br>    dotStrokes.geometry = dots;<br>    dotStrokes.geometry.verticesNeedUpdate = true;<br>  } else {<br>    dotsMaterial.opacity = 0;<br>  }<br>  <br>  renderer.setClearColor(new THREE.Color(userData.backgroundColor));<br></pre><p>Thanks for your contribution <a href="http://paypal.me/xikh">paypal.me/xikh</a> in helping us live the world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d14e6fa4d076" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xikh/spinworld-in-android-3d-version-d14e6fa4d076">SpinWorld! in Android , 3D version</a> was originally published in <a href="https://medium.com/xikh">Xikh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>