How can I make snake like X axis in d3 - d3.js

I need to make axis with curves at its edges in d3, and it can be scrolled down and show more data.
Is it possible with d3?
Tried to use d3-radial-axis library, but without success.
They only have example for radial scale and for spiral scale.

Related

How to use D3 raise/lower with shapes that were added to the svg at different times?

I have created a scatterplot using D3.js where I've added both circles and squares. After mouse over on a shape, I'd like to lower the shape to let other shapes behind it appear raised. Right now, lower/raise do not work to show circles above the squares if I add squares after adding circles on my svg. Any advice? Thanks!

Clipping non-projection elements (orthographic)

I'd like to add "flying" (3D) arcs to my orthographic projection, as shown here, but with clipping instead of the fade effect. This seems difficult since the arcs are created independently of the projection. (Each arc is defined by three points obtained from the projection--the start, end, and great circle midpoint extended along a line from the center of the canvas--but the arc itself is drawn using "2D" cardinal interpolation on the corresponding points on the svg canvas.)
My first thought was that I might need to do some spherical geometry to get the coordinates where the clipping happens, but now I'm wondering if there's a more straightforward way to accomplish this (I'm new to D3).
This is what my map looks like without clipping:
I'm also very green to d3, but fortunately I'm also fresh from my own search for a decent solution for clipping flight lines in orthographic. The demo you link to is clever in more ways than one:
The arc is drawn from three points interpolated with a Catmull-Rom curve in the projected 2D coordinates that happens to visually approximate a true circular curve in 3D nicely
The line fades with proximity of either of its points to the clipping plane, as you've pointed out
Drawing the spline in the projected, 2D coordinates eliminates any option to split the line before projection and get visual smoothness for cheap, even if d3 had the functionality natively (which I haven't been able to find anyways). That means that interpolation will have to be a lot more manual.
My first thought was that I might need to do some spherical geometry to get the coordinates where the clipping happens, but now I'm wondering if there's a more straightforward way to accomplish this
I eventually settled with what I consider the most obvious option, which unfortunately you're aiming precisely to avoid:
Obtain the coordinates of the clipping point by the cross product of the current globe center with the normal to the great circle plane of the arc. Given your origin and destination Po and Pd respectively and the globe center C, you're looking for C x (Po x Pd) normalized
Interpolate coordinates between your origin and destination using something like d3.geoInterpolate
Project interpolated point at the right scale (read: elevation) above the ground for that fraction of the flight line
Draw one [smoothed] line from the origin to the clipping point along the interpolated points in between, and another from the clipping point to the destination, moving one accordingly to the background. Watch the cases where the whole line is in front or behind the clipping plane.
To figure out where in the flight path you need to splice your clipped point, you will probably need to compare the great angles of your clipping point to one end vs. end-to-end. Note also that performance takes a hit, but you may still be satisfied with the number of flight lines you've drawn in your example.

how can i scale and translate cubes faces and edge in three.js

Is there a way to resize the edges and faces of objects like cubes in three.js?
For example, I want to build the shape you see below without using Blender or a modelling tool. I want to scale the edge and faces of the cube to make the sharp edges as you see below.

Circle pattern in d3

I am trying to draw an image like this using d3. Can someone please guide me on how I can determine the x and y coordinates of each of the small circles?

MATLAB:plotting multiple circles with varying radius specified by a vector

I have a scatter graph of some rectangular coordinates which are coloured according to Z data. What i want to show on the grid is varying distances away from 0,0 (kind of like contour rings) so I can visually see which points are in a particular band in meters. as I know the distance of each point away from 0,0 I thought maybe I could use linspace to generate say 10 different distance bands and plot them all together.
anyone help me achieve this or know a better way?

Resources