text
stringlengths 301
426
| source
stringclasses 3
values | __index_level_0__
int64 0
404k
|
---|---|---|
Academia, Peer Review, Visualization.
2015 — document updated and published publicly. December 20, 2015 — updated with reviewer roles, document history, and additional guides. December 21, 2015 — added notes on timeliness and conflicts of interest. January 18, 2016 — added my fancy new illustration for this article. Originally
|
medium
| 7,969 |
Data Analysis, Data Visualization.
series from Data Science and Data Analysis Path MySkill.id Yuk subscribe untuk mendapatkan email notifikasi setiap ada artikel terbaru oleh MySkill. Terdapat tiga poin pembelajaran yang akan kita pelajari, yaitu: Introduction Chart Types Google Data Studio Practice Sumber: AgriDigital.
|
medium
| 7,971 |
Data Analysis, Data Visualization.
Introduction Visualisasi data adalah sebuah metode untuk menyajikan data dalam bentuk non-teks (visual) untuk memudahkan pemahaman pembaca dalam menerima informasi dari data. Tujuan Visualisasi Data Speed: memudahkan pembaca memahami informasi dengan cepat. Comprehension: memuat banyak informasi
|
medium
| 7,972 |
Data Analysis, Data Visualization.
dalam sebuah grafik. Appeal: menarik perhatian dengan cara yang tidak diakomodir teks. Retention: mudah diingat dibandingkan dengan teks. Karakteristik Visualisasi Data yang Baik Akurat dan merepresentasikan data dengan baik. Mudah dipahami oleh audiens. Sesuai dengan kebutuhan audiens. Menampilkan
|
medium
| 7,973 |
Data Analysis, Data Visualization.
informasi yang cukup, tidak berlebihan ataupun terlalu simple. Manfaat Visualisasi Data Mengidentifikasi pola dan tren dalam data. Membandingkan data yang berbeda. Mengkomunikasikan hasil analisis data dengan lebih jelas. Mendorong pengambilan keputusan yang lebih baik. Chart Types Setiap charts
|
medium
| 7,974 |
Data Analysis, Data Visualization.
atau diagram memiliki fungsi yang berbeda-beda tergantung pada informasi yang ingin kita sampaikan dan data yang kita miliki. Diagram Perbandingan Bar Chart Diagram bar atau batang cocok digunakan untuk membandingkan nilai-nilai diskrit antara beberapa kategori. Bar chart merupakan chart yang
|
medium
| 7,975 |
Data Analysis, Data Visualization.
paling sering digunakan untuk memperlihatkan perbandingan setiap kelompok. Bar chart. Sumber: Corporate Finance Institute. Line Chart Diagram garis cocok untuk membandingkan nilai-nilai yang berubah terhadap waktu atau menunjukkan tren. Line Chart. Sumber: Tableau. Diagram Distribusi Histogram
|
medium
| 7,976 |
Data Analysis, Data Visualization.
Histogram menunjukkan distribusi nilai dalam sebuah variabel tunggal atau memperlihatkan jumlah kemunculan data. Histogram biasa digunakan untuk menggambarkan data yang bersifat diskrit. Contoh: Histogram. Sumber: Stat Online. Box Plot Box plot menampilkan ringkasan distribusi data, termasuk
|
medium
| 7,977 |
Data Analysis, Data Visualization.
median, kuartil, dan outlier. Box plot biasanya digunakan untuk melihat outlier data. Box plot. Sumber: Statology. Diagram Komposisi Pie Chart Diagram pie menunjukkan proporsi bagian dalam keseluruhan, digambarkan dengan satu lingkaran penuh dengan jumlah keseluruhan 100% atau 360°. Pie
|
medium
| 7,978 |
Data Analysis, Data Visualization.
memperlihatkan komposisi data dominan dan tidak dominan. Pie Chart. Sumber: Tableau. Tree Map Peta pohon menggambarkan proporsi dari tiap komponen, semakin besar jumlahnya, ukuran kotaknya akan semakin besar. Tree map pada dasarnya memiliki konsep yang sama dengan pie chart. Hanya saja tree map
|
medium
| 7,979 |
Data Analysis, Data Visualization.
dapat menggambarkan beberapa level agregasi sekaligus. Tree map. Sumber: Jaspersoft. Multiset Bar Chart Diagram ini memiliki konsep yang sama dengan bar chart biasa yang digunakan untuk menggambarkan data diskrit. Komponen yang diperlihatkan lebih banyak dibandingkan dengan bar chart biasa.
|
medium
| 7,980 |
Data Analysis, Data Visualization.
Multiset bar chart. Sumber: Catalogue. Area Chart Diagram area menggambarkan komposisi data dengan sumbu x (waktu) dan sumbu y (jumlah dari komponen tersebut). Area chart termasuk dalam chart komposisi yang dinamis. Area chart. Sumber: Minitab. Stacked Bar Chart Stacked Bar chart adalah bar chart
|
medium
| 7,981 |
Data Analysis, Data Visualization.
biasa yang ditumpuk. Perbedaannya, datanya dinormalisasi dengan jumlah keseluruhannya sehingga rasionya menjadi 100%. Pada stacked bar chart, kita dapat melihat komponen mana yang dominan. Stacked bar chart. Sumber: Matplotlib. Diagram Relasi Scatter Plot Plot sebaran menunjukkan hubungan antara
|
medium
| 7,982 |
Data Analysis, Data Visualization.
dua variabel numerik. Contoh: Scatter plot. Sumber: Corporate Finance Institute. Bubble Chart Diagram gelembung memperlihatkan hubungan antara tiga variabel dengan ukuran gelembung mewakili nilai variabel ketiga. Bubble chart. Sumber: Tableau. Geospatial Geospasial merupakan metode visualisasi
|
medium
| 7,983 |
Data Analysis, Data Visualization.
untuk memperlihatkan data dengan latar belakang peta, sehingga kita bisa mengetahui lokasi data pada peta. Bentuk data yang biasanya digunakan adalah: point (latitude, longitude), polygon (4 lat long, biasa juga disebut s2id). Geospatial plot. Sumber: Ganz, C., S., et al., (2023) dalam jurnal
|
medium
| 7,984 |
Data Analysis, Data Visualization.
Socioeconomic vulnerability and differential impact of severe weather-induced power outages. Google Data Studio Practice Pertama, kita buka Google Looker Studio. Data yang akan kita gunakan adalah hotel_bookings.csv. Tampilan awal dari Google Looker Studio. Kita buat laporan baru dengan klik Create
|
medium
| 7,985 |
Data Analysis, Data Visualization.
->Report. Lalu kita pilih data connector-nya adalah file upload. Data connnector pada Google Looker Studio. Setelah kita upload data ke dalam Google Looker Studio, selanjutnya kita langsung dapat membuat visualisasi data. Misalnya, kita ingin melihat berapa total booking pada city hotel dan resort
|
medium
| 7,986 |
Data Analysis, Data Visualization.
hotel, kita add a chart lalu pilih bar chart. Pada kolom Setup di sebelah kanan, kita pilih arrival sebagai Data range dimension, hotel sebagai dimension, dan Record Count sebagai Metric. Fitur menambahkan chart. Setup chart. Dengan sumbu x adalah Dimension dan sumbu y adalah Metric. Kita juga
|
medium
| 7,987 |
Data Analysis, Data Visualization.
dapat mengubah tulisan “Record Count” dengan klik pada sebelah kiri Record Count. Misalnya, kita ubah menjadi Total Booking. Kemudian kita juga dapat menambahkan filter pada chart. Misalnya, kita ingin mengetahui total reservasi yang dibatalkan. Kita pilih ADD A FILTER lalu pilih is_canceled. Fitur
|
medium
| 7,988 |
Data Analysis, Data Visualization.
menambahkan filter. Menambahkan filter is_canceled. Setelah kita klik save, tampilan bar chart akan berubah. Tampilan bar chart setelah filter is_canceled. Namun, kita dapat membuat filter otomatis yang dapat diaplikasikan kepada seluruh chart. Kita klik Add a control lalu pilih Drop-down list.
|
medium
| 7,989 |
Data Analysis, Data Visualization.
Selanjutnya kita klik sembarang di mana akan meletakkan kontrol tersebut. Setelah itu, kita pilih is_canceled dan ceklis 1. Tampilannya akan menjadi seperti ini. Tampilan bar chart setelah kontrol is_canceled. Kita juga dapat menambahkan Date range control untuk melihat perbandingan data pada waktu
|
medium
| 7,990 |
Data Analysis, Data Visualization.
tertentu. Misalkan kita ingin melihat total reservasi yang dibatalkan pada 1 Januari 2014 sampai 31 Desember 2016. Kita pilih Add a control lalu pilih Date range control. Tampilan chart akan menjadi seperti ini. Tampilan chart setelah kontrol Date range. Sebelum kita lanjut, kita harus memastikan
|
medium
| 7,991 |
Data Analysis, Data Visualization.
bahwa tipe data kita benar. Kita periksa tipe data dengan klik Resource pada menu bar lalu pilih Manage added data sources. Setelah itu, kita klik edit lalu periksa tipe data. Misalkan pada dimesi children tertulis Text, padahal seharusnya Numeric. Kita ubah dengan klik panah pada Text lalu pilih
|
medium
| 7,992 |
Data Analysis, Data Visualization.
Numeric -> Number lalu Done. Kita dapat membuat field baru dengan Add a field pada kolom Data sebelah kanan. Misalkan kita ingin membuat field total pengunjung, yakni penjumlahan adult, babies, dan children. Setelah itu, kita save dan melanjutkan pekerjaan kita. Misalnya, kita ingin melihat total
|
medium
| 7,993 |
Data Analysis, Data Visualization.
reservasi dibatalkan dari masing-masing total pengunjung. Terakhir kita dapat membuat average daily rate dengan menggunakan timeseries chart. Tips Membuat Dashboard yang Baik Membuat tampilan dashboard semenarik mungkin. Kita bisa menggunakan color palette dari Google Looker Studio atau melihat
|
medium
| 7,994 |
Data Analysis, Data Visualization.
referensi dari orang. Jangan buat visualisasi yang terlalu bertumpuk. Kita bisa menggunakan grid atau garis pemisah agar tampilan dashboard lebih rapih. Menggunakan font yang sesuai. Kita sesuaikan ukuran font untuk judul, legenda chart, dan lain-lain. Kita tidak boleh membuat ukuran font terlalu
|
medium
| 7,995 |
Power Electronics, Electrical Engineering, Electric Power, Engineering, Renewable Energy.
In the modern society, the availability of electric power has become an essential commodity. Electricity today has made almost every part of the society more functional in many ways. It is responsible to provide better health care, better information collection, storage, processing, heating,
|
medium
| 7,997 |
Power Electronics, Electrical Engineering, Electric Power, Engineering, Renewable Energy.
cooling, mobility and transport. Where does power electronics fit into this electric power supply? In any energy conversion system, we need a controller to supply and convert power efficiently through determining the demand and supply of power between the source and sink. Now, when we talk about
|
medium
| 7,998 |
Power Electronics, Electrical Engineering, Electric Power, Engineering, Renewable Energy.
sources and sinks in general it can be both from the same type of energy conversion (e.g.: — electrical to electrical energy) or different (e.g.: — electrical to mechanical or vice versa). Conversion procedures for the second type of energy requires a varied set of machinery and equipment which are
|
medium
| 7,999 |
Power Electronics, Electrical Engineering, Electric Power, Engineering, Renewable Energy.
not the concern for this article. We would like to focus our interest on the first type of conversion i.e., electrical to electrical conversion for this article. What is electrical power conversion? Before we jump into understanding the nuances of electric power conversion, we need to understand
|
medium
| 8,000 |
Power Electronics, Electrical Engineering, Electric Power, Engineering, Renewable Energy.
what we are trying to achieve from this power conversion. What are the multiple forms of electrical power that exists and the need for their conversion? We already know electrical power can classified into two main categories: — Direct Current (DC) and Alternating Current (AC). Fun Important Note:
|
medium
| 8,001 |
Power Electronics, Electrical Engineering, Electric Power, Engineering, Renewable Energy.
We should never use “DC current”: — It is like saying “Direct Current Current” or people like saying “Chai Tea” which means “Tea Tea”. What is DC or Direct Current? Direct Current is defined as flow of electric charge in a single direction (along the potential gradient). It can flow through
|
medium
| 8,002 |
Power Electronics, Electrical Engineering, Electric Power, Engineering, Renewable Energy.
conductors (wires), semiconductors (used in power converters) or even as electrons or ion beams in vacuum (wireless transmission of electricity). The best example to remember DC is a simple battery powered lamp or a torch running in battery. Interesting FACT!!! Direct Current was archaically as
|
medium
| 8,003 |
Power Electronics, Electrical Engineering, Electric Power, Engineering, Renewable Energy.
galvanic current (Luigi Galvani, the discoverer of electric current produced by chemical action — Batteries and “animal electricity”) What is AC or Alternating Current? Alternating Current is defined as the flow of electric charge which periodically reverses direction and magnitude as a function of
|
medium
| 8,004 |
Power Electronics, Electrical Engineering, Electric Power, Engineering, Renewable Energy.
time. The socket you plugin your mobile or your laptop provide AC to the charger. Electric Power Conversion We have got a brief insight on the two type of electric power we want to convert. This make four combinations of power conversion which can be achieved using power electronic converters. What
|
medium
| 8,005 |
Power Electronics, Electrical Engineering, Electric Power, Engineering, Renewable Energy.
are the four combinations? AC to AC, DC to DC, AC to DC, DC to AC. Power electronics can thus be defined as the branch of electrical engineering which studies the control and conversion of electric power using semiconductor switches. Let us now name the power electronic devices we use for
|
medium
| 8,006 |
Power Electronics, Electrical Engineering, Electric Power, Engineering, Renewable Energy.
converting electric power in combinations mentioned above. · AC to AC: — 1. AC voltage Converters (Magnitude conversion):-Switched Mode Power Supply (SMPS) in UPS. 2. Cyclo-converters (frequency conversion):-§ Electric Traction, Steel rolling mills. · DC to DC: -1. Choppers: § Electric vehicles
|
medium
| 8,007 |
Power Electronics, Electrical Engineering, Electric Power, Engineering, Renewable Energy.
with DC motors (battery to Choppers to DC motor) · AC to DC:- 1. Rectifiers: § Battery Chargers for mobile, laptops, Electric Vehicles. · DC to AC: -1. Inverters: §Household emergency power supply. Block Diagram depicting various power electronic converters References: Modern Power Electronics,
|
medium
| 8,008 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
Creating a procedural Chinese landscape painting in Blender 3D using geometry nodes and Voronoi noise. As usual, you can find the nodes under the MIT license for free use on my Github: https://github.com/IRCSS/Procedural-Chinese-Landscape-Painting-Blender-3D You can also find an colored example of
|
medium
| 8,010 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
a model the system generates on my Sketchfab, or a black and white version. I have already covered some of the basic workflow in geometry node in one of my previous posts. Here, I will cover some of the more advanced concepts used to generate the scene you see in the video. You can gladly reach out
|
medium
| 8,011 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
on twitter if you have any questions about some of the stuff I skipped. First of all, here is an example of the style I would like to imitate, a bit more adjusted to the modern aesthetic. I tried this in Houdini ages ago, and while I was happy with the previous results, I wanted something a bit
|
medium
| 8,012 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
different in geometry nodes. The main thing to take care of first is to figure out a way to generate the mountains. One typical way is to draw a height map, and apply it on a dense plane. The problem with that is that I dont want to do this by hand. My main idea was to generate a Voronoi noise,
|
medium
| 8,013 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
then decide to add a mountain to some of the cells, generate a random height for each cell, and pull those cells outs. Then deform the cells along their height to get the curvy look in the reference. First, the Voronoi. Generating a voronoi noise is very easy. Best shown in the animation below:
|
medium
| 8,014 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
What you are basically doing is measuring per pixel, the distance to the closest red dot. At the half point between two cell centers, is when a pixel (or vertex if you are doing displacement) switches between belonging from one cell to the other. Blender has a node for generating Voronoi, both in
|
medium
| 8,015 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
shaders as well as in geometry nodes. However, I wouldnt recommend using it, for a simple reason. The node uses a GPU parallel algorithm which has a limited search area. This means you would get very similar looking cells. You can see how due to the limitations of a cell based voronoi on GPU, you
|
medium
| 8,016 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
can cells which have roughly the same surface area, but using other algo, you can get cells that are closer to how mountains look like in our reference If you think about it, there is an easier way to do the above. If you spawn a bunch of points on the surface of a subdivided plane, then use the
|
medium
| 8,017 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
Geometry Proximity node, you get exactly what I described above. You can store the distance to the point and the position of the point in an attribute to do things like pulling out the mountain or generate a different random number per cell. At the moment, the result we are getting is the same as
|
medium
| 8,018 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
the Voronoi node itself. But if we change the type of randomness from Poisson disk to Random and reduce density, you will see that we start getting irregular cells. Now we have our cells. They are defined by the position of the points we spawned. Next is to decide which of these cells will contain
|
medium
| 8,019 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
a mountain. The trick used here is the oldest in the book. If you have a cell center represented by a position, you can take the dot product between the position and some arbitrary vector to convert the center to a float. Then pass this float to a random number generator, which generates a number
|
medium
| 8,020 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
between 0 and 1. If the number generated is smaller than a variable defined by you, lets call this probability, the cell is a mountain. If not it is a flat area. Blender has a node for this, it is the Random value node, which generates a boolean. You can pass the float you generate from the cell
|
medium
| 8,021 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
center to the ID to get a unique 0 or 1 per cell. Multiply this 0 or 1 output by the other part of the calculation and you will be “culling” some mountains. In the image above, you also see me using the UVs of the subdivided plane, to gradually bring down the mountains as they get closer to the
|
medium
| 8,022 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
plane boundary. This is to avoid a noticeable end to the scene. There is also the part where you actually create the mountain looking shape. For this we take the distance to the cell center, and the closer the vertex is to the cell center, the more offset we add along the normal of the plane (or up
|
medium
| 8,023 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
direction). A very handy tool here is the float curve. If you pass on this distance through a curve node, you can control the shape of the peak interactively using the curve tool. The last part is simply putting all these different components together by multiplying them with one another. The three
|
medium
| 8,024 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
components were, the displacement creating the peak, the boolean culling some of the cells and lastly the float flattening the mountains close to the corner of the plane. What comes after this is hours of playing around with noises and shaping functions to get the exact look you want. One of the
|
medium
| 8,025 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
first things I always try is to add some noise on the surface, to make it look more nature like and also get closer to the wavy look of the reference photo. Adding Shore Lines and Riverbanks Now we have our mountain. Next step is to somehow add a shore line that acts as a river bank. You can of
|
medium
| 8,026 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
course generate just some random Perlin noise height map to get the train. But the patterns generated from that wouldnt feel natural. Rivers dont just end in a mountain, but flow between them. Even for lakes, there is typically a pattern of gradual increase in height between the boundaries of the
|
medium
| 8,027 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
lake and the mountain base. Doing stuff like these is already a lot tricker than simply creating mountains in geometry nodes. What is it that we actually want? We want the ground around the mountain to be slightly higher than the part where the river flows. This is an ideal scenario for a signed
|
medium
| 8,028 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
distance field map. This map will tell us per pixel, the distance to the base of the mountain. So, to the rescue comes once again the geometry proximity node. We duplicate the mesh we have generated so far, delete everything in it that is not a mountain. Then on the original mesh calculate for each
|
medium
| 8,029 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
vertex the distance to the closest mountain. If the distance is closer than a certain amount we raise the ground. Again using a float curve, we control exactly how the transition between the mountain and the river bank and the river itself works. I realize I am skipping a bunch of material and
|
medium
| 8,030 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
procedural texturing stuff. One screen shot it is a debug looking scene, another the mountains are fully colored. But that is another topic for another day, also you can find a tons of tutorials in Substance Designer community, creating insane stuff using just noises and maps. Of course, river
|
medium
| 8,031 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
banks are not so clean and perfect. Once again, we apply noise to the calculation above, to get a more natural looking river bank: Now we have our mountains and we have a river bank. Time to spawn some houses. Some Housing Tricks The houses are also all procedurally generated. I won’t have the time
|
medium
| 8,032 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
to cover in depth how that is done, especially because workflows in the future will probably get better. This type of procedural modeling is one of the most underdeveloped areas in geometry nodes compared to Houdini. All the houses generation is on one node group, you can tab in and go over it if
|
medium
| 8,033 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
you would like to know more. One very useful trick which I would like to cover however is rotating, or scaling instances that have been realized and modified. It is very typical for you to spawn instances then having to realize them in order to modify them individually. Especially in the case of
|
medium
| 8,034 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
procedural house modeling. It is also very useful to keep everything aligned with global axis, in order to be able to do procedural modeling. Imagine you want to create a chinese style roof, as I have done here: If you were modeling this, you would probably take a cube, add an edge loop, then take
|
medium
| 8,035 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
the top of that edge loop and pull it up. You might add some more edge loops to move away from triangular roofs to a more curved one. How would you do this in geometry nodes? If you keep your houses axis aligned, you can save the pivots of the houses as a per vertex attribute. This information can
|
medium
| 8,036 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
be used to reconstruct the “local” space of each house. Using this information you can mask certain areas in local space to select only the vertices you need for raising the roof. In order to adjust each house individually and with variation, you would have to realize the instances. If you want to
|
medium
| 8,037 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
rotate the houses you got the problem that you have one huge mesh. The trick here is to use the house pivot you have saved as an attribute, and transform all houses first so that the pivot is on scene origin (vector zero), rotate and then offset it back. Here is how that would go: By subtracting
|
medium
| 8,038 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
the pivot, you are moving all the houses to sit on scene origin. Then you rotate it: This is a simple 2D rotation using matrices in 3D space. Last step is to offset the houses back to their original location: The above workflow is way uglier than it needs to be. For example Blender can expose the
|
medium
| 8,039 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
transform as a type to us, plus added maths library support for matrices with a bunch of utility functions. This can condense all the above to 1 or 2 nodes. Waterfalls Waterfalls are even harder to do yet, but there is a cool new node in town which we can use. The core idea with waterfalls is this.
|
medium
| 8,040 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
You want the waterfall to start somewhere up there in the mountain, then flow down to the river. Watefalls join rivers, which sometimes join together to flow in a bigger river. How would you go about coding that? The easy part of the puzzle is that once you have a spline going from the source to
|
medium
| 8,041 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
the river, you can simply mesh it to get the waterfall. The harder part is to find a meaningful path for the water to flow. Consider a naive way for example, we take a random point at the top of the mountain and connect it to a random point in the river. Then we use the ray cast node to shrink wrap
|
medium
| 8,042 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
this spline to the surface of our model. We would have a major problem however, our two random points can be anywhere, so our waterfall and river could potential go up and down several mountains. What we need is to know first of all what the closest path is between the mountain top and the river
|
medium
| 8,043 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
and second which path would conform the most with how running water behaves. There is a new node that does that for us, and it is called shortest edge path which is used together with edge paths to curves. What this node does is to take a series of start vertices and find the shortest paths to a
|
medium
| 8,044 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
series of end vertices. It actually does everything we need. For example several rivers might join together if their shortest paths aligns. Or streams wont flow to the other side of the model, but find the closest path to the main river. Even cooler is that the node allows us to provide our own
|
medium
| 8,045 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
edge cost algorithm. The edge cost is what defines what “shortest” path even means. In a typical situation, if you have an edge with vertex V1 and V2, the shortest is the one where the distance between V1 and V2 is smallest. However, in our case, there is a secondary condition, we dont want the
|
medium
| 8,046 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
river to flow back up again. Our cost is calculated as a combination of distance and whether the V2 is lower than V1. So an edge would be more costly to traverse, if you have to move up. I also add some noise to the cost to make the water behave a bit more randomly to account for all the cool
|
medium
| 8,047 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
nature stuff we cant calculate. As you can see, the algo connects a series of random points at the top to the points at the button. Bridges This one was actually quite hard to figure out. I had quite a few moments of “is this even possible?”. Bridges connect the banks of the river. what makes these
|
medium
| 8,048 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
so hard is that the LTS version of Blender I am on still doesn’t have looping functionality. With a looping functionality you could simply loop over the border vertices between river and land, calculate for each one the closest vertex that is not connect to that land mass, finally run a series of
|
medium
| 8,049 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
criteria to determine whether a bridge can pop up there. You cant do any of that in Blender, yet. At least not in that way. If you have also spend a bit of time writing programs for graphic cards, you would know that there is always a way to take a single threaded algorithmn and convert it to one
|
medium
| 8,050 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
that would be friendly to the single instruction multiple data architecture which GPUs (and geometry nodes) uses. First step is to determine the border between land and water. This is actually quite easy. We know that when we go from land to water, we go from a certain height to the height of the
|
medium
| 8,051 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
water. Using the Store Attirbute we can first loop through all the edges connected to a vertex and calculate which edge is the one that is descending the most. In other words the direction of the river in relation to that vertex. Knowing this, we can check whether the two vertices making that edge
|
medium
| 8,052 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
conform to our criteria of where the border vertices are positioned in the up axis. I displace the vertices that pass our test for visualization purposes here. My first idea was to spawn a bunch of lines and randomly connect these border vertices with eachother. Then, for each line ray cast from
|
medium
| 8,053 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
start to end point and check if there is a mountain on the way. After all no bridge can pop up that goes through a mountain. Then run some other tests such as kill bridges that are too short or too long and hopefully be left with a few good bridges. This is actually not half bad. But there is a
|
medium
| 8,054 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
problem. Some bridges are aligned as a tangent to the shore line where they start. This never happens in the real world. In reality, bridges are usually placed in a way that they are perpendicular to the bank of the river. But in the current way I am doing this, I have no way of knowing whether a
|
medium
| 8,055 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
bridge is aligned with the landsacpe or not. Guess which node comes to the rescue? Geometry Proximity! We actually do know the topology of the landscape the bridge should go on. This is because river banks are always extended from the base of the mountain. So if we do a geometry proximity to the
|
medium
| 8,056 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
mountains again (or reuse the calculation we already did), and take the verctor which goes from the river bank to the closest point on the mountain base, we have a vector that is perpendicular to the river bank. We can take this vector to check if there is a river bank along that direction on the
|
medium
| 8,057 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
other side, using the geometry proximity node. We are placing our end point at random distances away from our river bank along the direction that points away from the land. Then we check where the closest spot on the river bank on the other side is. Combined with other methods we were already doing
|
medium
| 8,058 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
such as culling bridges that go through mountains or are too long, this on itself gives a very good result. There is one last thing that is missing. Just because the begining of the bridge is aligned with the shore, doesnt mean the end is too. So we are going to do the same process but from the
|
medium
| 8,059 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
other side, we take the end point of the bridge, we do geometry proximity to the base of the mountain to get the vector that represents the outward direction of the landscape and if this vector is misaligned with the birdge as a whole we delete this bridge. Now we are left with only valid bridges.
|
medium
| 8,060 |
Blender, Procedural, 3d Modeling, Geometry Node, Coding.
Or at least almost. There are still bridges that cross each other, or bridges that pop up way close to eachother. You can fix these, but I decided to give up here. When Blender adds the looping functionality in future releases, you can very simply loop over these bridges, and delete the onces that
|
medium
| 8,061 |
Prototype Design Pattern, Prototype Design, Flutter, Flutter App Development, Dark Design Patterns.
Hello Readers. Welcome to the 2nd eposide of design patterns. Hope you all enjoyed the first episode Builder Design Pattern. In this episode we are going to discuss Prototype design pattern. Real Meaning of Prototype… ? Prototype means Template/Sample/Model. So Prototype is a creational design
|
medium
| 8,063 |
Prototype Design Pattern, Prototype Design, Flutter, Flutter App Development, Dark Design Patterns.
pattern that lets you copy existing objects without making your code dependent on their classes. When we have a use case where the object varies only in very few attributes, we can create a prototype and every new object will be a copy of prototype object with only few different attributes. For
|
medium
| 8,064 |
Prototype Design Pattern, Prototype Design, Flutter, Flutter App Development, Dark Design Patterns.
Instance we have an object, and we want to create an copy of it. Example: Student ayush = new Student(); ayush.name = "Ayush"; ayush.age = 25; ayush.psp = 90; ayush.averageBatchPSP = 80.0; ayush.batchName = "July 2022"; Student anurag = new Student(); anurag.name = "Anurag"; anurag.age = 30;
|
medium
| 8,065 |
Prototype Design Pattern, Prototype Design, Flutter, Flutter App Development, Dark Design Patterns.
anurag.psp = 9040 anurag.averageBatchPSP = 60.0; anurag.batchName = "April 2022"; In the above example name,age and psp attibutes are same in every object. Another Example : First, we will new object of the same class. Then you have to go through all the fields of the original object and copy their
|
medium
| 8,066 |
Prototype Design Pattern, Prototype Design, Flutter, Flutter App Development, Dark Design Patterns.
values over to the new object. This is a nice solution but in some cases only if your variables are not private. When object’s fields will be private and not visible from outside then this will create a problem. 😞😞 Problems: The main objective is to avoid creating new instances from scratch because
|
medium
| 8,067 |
Prototype Design Pattern, Prototype Design, Flutter, Flutter App Development, Dark Design Patterns.
there are situations where creating a new object can be very expensive. So, This design pattern encourages to clone an existing object. Let’s see an example… Student st = new Student(); Student stCopy = new Student(); stCopy.name = st.name; stCopy.batch = st.batch; // we are creating a copy here.
|
medium
| 8,068 |
Prototype Design Pattern, Prototype Design, Flutter, Flutter App Development, Dark Design Patterns.
So Client Know all // the properties of student. So Let’s see Some Cons: Creating a copy can be lengthy for Client. Client needs to know the internal details of student class. so abstraction is not followed. i.e; Security issue Student might have some private attributes which client would not be
|
medium
| 8,069 |
Prototype Design Pattern, Prototype Design, Flutter, Flutter App Development, Dark Design Patterns.
able to access. Solution: Cloning from original instance will only be needed after first instance is created. Creation of new instances will not required in Prototype. Our Existing initial object that we created at first time contains the state of the object and it will act as the prototype. The
|
medium
| 8,070 |
Prototype Design Pattern, Prototype Design, Flutter, Flutter App Development, Dark Design Patterns.
newly cloned object is a copy of the original object. Clone method is the way to implement prototype pattern. Steps to implement prototype design pattern: We are going to create an interface Prototype that contains a method getClone() public interface Prototype<T> { public T clone(); } Then, we
|
medium
| 8,071 |
Prototype Design Pattern, Prototype Design, Flutter, Flutter App Development, Dark Design Patterns.
create a modal class StudentModel which implements Prototype interface that does the cloning of Student object. public class Student implements Prototype<Student> { private String name; private int age; private double psp; double averageBatchPsp; String batchName; Student() { } Student(Student
|
medium
| 8,072 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.