Saturday, August 12, 2017

Triangle rasterization under the hood (the old-school approach)

I didn't find a single source which would gave me a complete and clear picture of how to rasterize a triangle in a simplest way.

So, here's my attempt to put everything in order.

Consider, that we know how to draw a line and nothing more. Here's the corresponding method declaration for it:

void drawLine(int x0, int y0, int x1, int y1, Color color);

We need to implement a method which will draw a triangle and fill it with a specified color. Here's the corresponding method declaration:

void drawTriangle(Vec2 v0, Vec2 v1, Vec2 v2, Color color);

Here's the visual representation of what this method should do:

Initial vertices
Rasterized triangle

drawTriangle(v0, v1, v2, Color.BLACK)

Saturday, March 4, 2017

JLV 1.4.0 released

Eclipse Marketplace:

Project's page:

Release notes:
  • made plugin work on Eclipse 4.6
  • added support for logback and log4j2
  • redesigned detailed log view

Thursday, February 9, 2017

How to connect Sony LT25i to Android Studio under Fedora 24

0. Turn on USB debugging mode via Settings > Developer options

1. Connect smartphone to PC via USB and get vendor's id

$ lsusb
Bus 003 Device 013: ID 0fce:6186 Sony Ericsson Mobile Communications AB

Note: here vendor's id is: 0fce

2. Create udev rules file to allow Fedora to detect device

$ cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", GROUP="rdiachenko"

Note: here you need to change GROUP onto your own