• Developing a symbolic-expression library with C#. Differentiation, simplification, equation solving and many more

      Hello!

      Why does programming a calculator seem to be a task, which every beginner undertakes? History might have the answer — computers were created for this exact purpose. Unlike the beginners, we will develop a smart calculator, which, although won't reach the complexity of SymPy, will be able to perform such algebraic operations as differentiation, simplification, and equations solving, will have built-in latex support, and have implemented features such as compilation to speed up the computations.

      What are the articles about?
      It will superficially tell about assembling an expression, parsing from a string, variable substitution, analytic derivative, equation numerical solving, and definite integration, rendering to LaTeX format, complex numbers, compiling functions, simplifying, expanding brackets, and blah blah blah.
      For those who urgently need to clone something, repository link.

      Let's do it!
      Read more →
    • Understandable RayTracing in 256 lines of bare C++

      • Tutorial

      Understandable RayTracing in 256 lines of bare C++


      This is another chapter from my brief course of lectures on computer graphics. This time we are talking about the ray tracing. As usual, I try to avoid third-party libraries, as I believe that it makes students check what's happenning under the hood. Also check the tinykaboom project.


      There are plenty of raytracing articles on the web; however the problem is that almost all of them show finished software that can be quite difficult to understand. Take, for example, the very famous businness card ray tracer challenge. It produces very impressive programs, but it's very difficult to understand how this works. Rather than showing that I can do renders, I want to tell you in detail how you can do it by yourself.


      Note: It makes no sense just to look at my code, nor just to read this article with a cup of tea in hand. This article is designed for you to take up the keyboard and implement your own rendering engine. It will surely be better than mine. At the very least change the programming language!


      So, the goal for today is to learn how to render such images:


      Read more →
      • +29
      • 3.7k
      • 5
    • How elliptic curve cryptography works in TLS 1.3

        image

        A couple of reader alerts:

        In order to (somewhat) simplify the description process and tighten the volume of the article we are going to write, it is essential to make a significant remark and state the primary constraint right away — everything we are going to tell you today on the practical side of the problematics is viable only in terms of TLS 1.3. Meaning that while your ECDSA certificate would still work in TLS 1.2 if you wish it worked, providing backwards compatibility, the description of the actual handshake process, cipher suits and client-server benchmarks covers TLS 1.3 only. Of course, this does not relate to the mathematical description of algorithms behind modern encryption systems.

        This article was written by neither a mathematician nor an engineer — although those helped to find a way around scary math and reviewed this article. Many thanks to Qrator Labs employees.

        (Elliptic Curve) Diffie-Hellman (Ephemeral)

        The Diffie–Hellman legacy in the 21 century

        Of course, this has started with neither Diffie nor Hellman. But to provide a correct timeline, we need to point out main dates and events.

        There were several major personas in the development of modern cryptography. Most notably, Alan Turing and Claud Shannon both laid an incredible amount of work over the field of theory of computation and information theory as well as general cryptanalysis, and both Diffie and Hellman, are officially credited for coming up with the idea of public-key (or so-called asymmetric) cryptography (although it is known that in the UK there were made serious advances in cryptography that stayed under secrecy for a very long time), making those two gentlemen pioneers.

        In what exactly?
        Read more →
      • A City Without Traffic Jams


          Chapter 2.
          (the link to Chapter 1)

          The Art of Designing Road Networks


          Transport problems of a city through the eyes of a Computer Scientist


          If I were recommended an article with the title “The Art of Designing Road Networks,” I would immediately ask how many road networks were built with the participation of its author. I must admit, my professional activity was far from road construction and was recently associated with the design of microprocessors where I, among other responsibilities, was engaged in the resource consumption of data switching. At that time my table stood just opposite the panoramic window which opened up a beautiful view of the long section of the Volgograd Highway and part of the Third Transport Ring with their endless traffic jams from morning to evening, from horizon to horizon. One day, I had a sudden shock of recognition: “The complexities of the data switching process that I struggle with on a chip may be similar to the difficulties the cars face as they flow through the labyrinth of road network”.
          Probably, this view from the outside and the application of methods that were not traditional for the area in question gave me a chance to understand the cause of traffic jams and make recommendations on how to overcome the problem in practice.
          Read more →
        • Polygonal Mesh to B-Rep Solid Conversion: Algorithm Details and C++ Code Samples

            Boundary representation (B-rep) is the primary method of representing modeled objects in most geometric kernels, including our C3D Modeler kernel. The core algorithms that edit models, such as applying fillet operations, performing cutting operations, and obtaining flat projections require the precision of B-rep representations. The rapidly growing variety of 3D data in polygonal formats makes the task of model transformations from polygons into boundary representation increasingly relevant. As a result, we developed a new SDK, C3D B-Shaper, which is part of our C3D Toolkit.

            image
            Read more →
          • How to Catch a Cat with TLA+

              Many programmers struggle when using formal methods to solve problems within their programs, as those methods, while effective, can be unreasonably complex. To understand why this happens, let’s use the model checking method to solve a relatively easy puzzle:

              Conditions


              You’re in a hallway with seven doors on one side leading to seven rooms. A cat is hiding in one of these rooms. Your task is to catch the cat. Opening a door takes one step. If you guess the correct door, you catch the cat. If you do not guess the correct door, the cat runs to the next room.
              Read more →
            • Version 12 Launches Today! (And It’s a Big Jump for Wolfram Language and Mathematica)



                Quick links


                The Road to Version 12
                First, Some Math
                The Calculus of Uncertainty
                Classic Math, Elementary and Advanced
                More with Polygons
                Computing with Polyhedra
                Euclid-Style Geometry Made Computable
                Going Super-Symbolic with Axiomatic Theories
                The n-Body Problem
                Language Extensions & Conveniences
                More Machine Learning Superfunctions
                The Latest in Neural Networks
                Computing with Images
                Speech Recognition & More with Audio
                Natural Language Processing
                Computational Chemistry
                Geographic Computing Extended
                Lots of Little Visualization Enhancements
                Tightening Knowledgebase Integration
                Integrating Big Data from External Databases
                RDF, SPARQL and All That
                Numerical Optimization
                Nonlinear Finite Element Analysis
                New, Sophisticated Compiler
                Calling Python & Other Languages
                More for the Wolfram “Super Shell”
                Puppeting a Web Browser
                Standalone Microcontrollers
                Calling the Wolfram Language from Python & Other Places
                Linking to the Unity Universe
                Simulated Environments for Machine Learning
                Blockchain (and CryptoKitty) Computation
                And Ordinary Crypto as Well
                Connecting to Financial Data Feeds
                Software Engineering & Platform Updates
                And a Lot Else…

                Read more →
              • AdBlock has stolen the banner, but banners are not teeth — they will be back

                More
                Ads
              • Estimation of VaR and ConVaR for the stock price of the Kazakhstani company

                  The last decades the world economy regularly falls into this vortex of financial crises that have affected each country. It almost led to the collapse of the existing financial system, due to this fact, experts in mathematical and economic modelling have become to use methods for controlling the losses of the asset and portfolio in the financial world (Lechner, L. A., and Ovaert, T. C. (2010). There is an increasing trend towards mathematical modelling of an economic process to predict the market behaviour and an assessment of its sustainability (ibid). Having without necessary attention to control and assess properly threats, everybody understands that it is able to trigger tremendous cost in the development of the organisation or even go bankrupt.


                  Value at Risk (VaR) has eventually been a regular approach to catch the risk among institutions in the finance sector and its regulator (Engle, R., and Manganelli S., 2004). The model is originally applied to estimate the loss value in the investment portfolio within a given period of time as well as at a given probability of occurrence. Besides the fact of using VaR in the financial sector, there are a lot of examples of estimation of value at risk in different area such as anticipating the medical staff to develop the healthcare resource management Zinouri, N. (2016). Despite its applied primitiveness in a real experiment, the model consists of drawbacks in evaluation, (ibid).


                  The goal of the report is a description of the existing VaR model including one of its upgrade versions, namely, Conditional Value at Risk (CVaR). In the next section and section 3, the evaluation algorithm and testing of the model are explained. For a vivid illustration, the expected loss is estimated on the asset of one of the Kazakhstani company trading in the financial stock exchange market in a long time period. The final sections 4 and 5 discuss and demonstrate the findings of the research work.

                  Read more →
                • How do technical indicators on stock market actually work?

                    Anyone, who has ever been interested in stocks or cryptocurrencies has seen these additional lines on charts. You may have heard the opinions that they don’t work. But they greatly improve my trading ability, while displaying alot of important data. But how are they actually works? And to whom it can be useful?

                    You should definitely read this if:

                    1. You use them in day trading
                    2. You are planning to write a trading bot
                    3. If you want to implement a trading strategy or indicators by yourself


                    Read more →
                  • Ternary computing: basics

                      Balanced ternary


                      I am working on a computer architecture principles lectures for our university; and as an assignment I'd like to propose to my students to build a simple programmable machine working in ternary. The main reason is fun: as a lecturer I must bring a bit of entertainment, otherwise I won't be listened to. Besides, it is important for historic reasons. Any further «why?!» questions will be answered «Because I can».

                      This page describes the very basics, it won't go beyond a simple ternary adder (and its hardware implementation). Stay tuned for more.

                      I chose the balanced ternary system: every trit represents one of three possible states, -1, 0 or 1. A very extensive description of this system may be found here.


                      Read more →
                    • The Fall and Recovery of a Mold

                        Software component developers tend to be far removed from the end users of the products in which their components are employed. Recently, however, we connected directly with a KOMPAS-3D MCAD user to solve an issue involving mold design. It seems that 3D models were being exported incorrectly to data exchange formats like STP, X_T, and SAT. The cause, unhappily for us, turned out to be in our С3D Modeler geometric modeling kernel. Here is how we solved the problem, quickly.

                        image
                        Читать дальше →
                      • Naïve Math: the Mendocino motor and Earnshaw's theorem

                        • Tutorial

                        The problem statement


                        I was surfing the Internet the other day and a rather curious thing caught my mind: the Mendocino motor. It’s an extremely low-friction bearing rotor: the original one had a glass cylinder hanging on two needles, but the modern ones use magnetic suspension. It’s a brushless engine: the rotor has solar batteries attached to it, which generate current for the coils wrapped around the rotor. The rotor spins in a fixed magnetic field, the solar batteries getting exposed to the light source one after the other. It’s a rather elegant solution that’s very possible to recreate at home.

                        Here’s the video that explains how it works (in Russian):


                        But this video had another curiosity even stronger than the engine itself. In the video description Dmitry Korzhevsky writes: “You CAN’T replace the side support with a magnet! Don’t ask me about this anymore!”
                        I LOVE the 'impossible' word!
                      • Kalman Filter

                        • Translation
                        • Tutorial


                        There are a lot of different articles on Kalman filter, but it is difficult to find the one which contains an explanation, where all filtering formulas come from. I think that without understanding of that this science becomes completely non understandable. In this article I will try to explain everything in a simple way.

                        Kalman filter is very powerful tool for filtering of different kinds of data. The main idea behind this that one should use an information about the physical process. For example, if you are filtering data from a car’s speedometer then its inertia give you a right to treat a big speed deviation as a measuring error. Kalman filter is also interesting by the fact that in some way it is the best filter. We will discuss precisely what does it mean. In the end of the article I will show how it is possible to simplify the formulas.
                        Read more →
                        • +21
                        • 3.1k
                        • 1
                      • How linear algebra is applied in machine learning

                          When you study an abstract subject like linear algebra, you may wonder: why do you need all these vectors and matrices? How are you going to apply all this inversions, transpositions, eigenvector and eigenvalues for practical purposes?


                          Well, if you study linear algebra with the purpose of doing machine learning, this is the answer for you.


                          In brief, you can use linear algebra for machine learning on 3 different levels:


                          • application of a model to data;
                          • training the model;
                          • understanding how it works or why it does not work.

                          drawing
                          Read more →